Unit¶
-
public final class
Unit
¶ One node in the call graph. Represents one particular procedure or interface or external or module or package or file… of the current code. Holds links to callers, callees, containing CallGraph, SymbolTable’s,
For procedures, holds its Flow Graph in the form of an EntryBlock, an ExitBlock, and a graph of Block’s in between.
Fields¶
activeCalledNames¶
activityPatterns¶
-
public TapList<ActivityPattern>
activityPatterns
¶ Info for AD on this Unit. List of all possible ActivityPattern’s for the calls to this Unit. Each ActivityPattern contains information about which variables being active, useful, etc, at all necessary locations inside this Unit (Specific to AD).
allBlocks¶
analysisIsOutOfDateDown¶
-
public boolean
analysisIsOutOfDateDown
¶ Mark useful in any top-down static Data Flow analysis to write whether this Unit must be analyzed again at next analysis sweep.
analysisIsOutOfDateUp¶
-
public boolean
analysisIsOutOfDateUp
¶ Mark useful in any bottom-up static Data Flow analysis to write whether this Unit must be analyzed again at next analysis sweep.
argsPublicRankTrees¶
childrenClasses¶
diffInfo¶
dirNumberMaxSymbolHolder¶
-
public NewSymbolHolder
dirNumberMaxSymbolHolder
¶ The NewSymbolHolder of new variable “NBDirsMax”.
enclosingUnitOfInterface¶
entryBlock¶
-
public EntryBlock
entryBlock
¶ The entry Block.
externalShape¶
genericArrow¶
globalZonesNumber4¶
-
public int[]
globalZonesNumber4
¶ The number of global zones in the externalShape of this Unit. It is also the rank (plus 1) of the last zone whose data-flow info can be plainly copied between this Unit and any of its caller Units.
isCGCycle¶
-
public boolean
isCGCycle
¶ Utility temporary info built during static analyses. True iff this Unit is head (if the analysis is bottom-up) or tail (if the analysis is top-down) of a cycle in this Call Graph. This cycle detection is based on the rank’s of the Units.
isMadeForInline¶
-
public boolean
isMadeForInline
¶ True if calls to this Unit are supposed to be inlined.
isTotallyDeclared¶
-
protected boolean
isTotallyDeclared
¶ True for functions whose arguments and result types are fully specified. If not, pieces of the type must be inferred.
localMaps¶
-
public MemoryMaps
localMaps
¶ The memory maps built for non-global (non-COMMON) EQUIVALENCEd variables (Fortran-specific)
lowerLevelUnits¶
messages¶
-
public TapList<PositionAndMessage>
messages
¶ error and warning messages.
mustHandleTBR¶
-
public BoolVector
mustHandleTBR
¶ Summary of zones and arguments that the diff of this Unit must handle.
nbArrows¶
-
public int
nbArrows
¶ Total number of FGArrows, including those from/to EntryBlock and ExitBlock.
newDiffCIncludes¶
nonFlowInstructions¶
-
public TapList<Instruction>
nonFlowInstructions
¶ The list of instructions that do not depend on the flow (e.g. sub-Units definitions), and that could not be placed into normal Flow Graph Block’s because they are unreachable by the control flow (e.g. because they are after an op_goto, op_exit, op_return…).
orig2copiedBlocks¶
-
public BlockStorage<Block>
orig2copiedBlocks
¶ When this Unit is copied from origUnit, correspondence from the Block’s of origUnit to the Block’s of this Unit. Wiped out when used.
origUnit¶
otherImportedModules¶
parametersOrModuleNameTree¶
plainDependencies¶
-
public BoolMatrix
plainDependencies
¶ Plain dependencies data-flow info: dependency of each output wrt each input.
pointerEffect¶
-
public BoolMatrix
pointerEffect
¶ Pointer data-flow info: pointer destinations upon unit exit, wrt destinations upon unit entry.
position¶
-
public int
position
¶ Indication of the position of this Unit in its file. If -1, then getPosition will recompute it from the positions of the instructions inside.
postCommentsBlock¶
preCommentsBlock¶
privacy¶
publicZonesNumber4¶
-
public int[]
publicZonesNumber4
¶ The number of public zones of this Unit i.e. the globals plus the arguments
relevantZones¶
-
public BoolVector
relevantZones
¶ BoolVector, one bit per zone (i.e. per index in the externalShape), with value 1 if this zone can be accessed by this Unit or by some Unit recursively called. This info is needed to compensate for the introduction of irrelevant (HIDDEN) zones due to the removal of the old “side-effect” mechanism. This info may be used to compress the data-flow info on this Unit, since it is guaranteed (?) that the info on non-relevant zones is necessarily neutral.
tagMessagePassingSymbolHolder¶
-
public NewSymbolHolder
tagMessagePassingSymbolHolder
¶
testZoneInfos¶
-
public int[]
testZoneInfos
¶ For each control zone rank (from 0 up), the rank of the corresponding ZoneInfo.
translator¶
-
public PublicInfo[]
translator
¶ Information used to translate zone-based data between this Unit’s internal representation and external, published representation.
unitADDependencies¶
-
public BoolMatrix
unitADDependencies
¶ Differentiable dependencies for this Unit. Used so far, mostly to store the AD deps matrix of intrinsics found from the user-given library files.
unitInOutN¶
-
public BoolVector
unitInOutN
¶ In-Out data-flow info: vector of zones possibly/partly not accessed.
unitInOutR¶
-
public BoolVector
unitInOutR
¶ In-Out data-flow info: vector of zones possibly/partly read and not written.
unitInOutRW¶
-
public BoolVector
unitInOutRW
¶ In-Out data-flow info: vector of zones possibly/partly read then written.
unitInOutW¶
-
public BoolVector
unitInOutW
¶ In-Out data-flow info: vector of zones possibly/partly not read and only written.
unitTBR¶
-
public BoolVector
unitTBR
¶ TBR info: vector of zones possibly becoming TBR when going through this Unit, in other words zones used non-linearly and therefore needed in derivatives.
upperLevelUnit¶
usedAsElementalResult¶
-
public boolean
usedAsElementalResult
¶ True for procedures that F90 can use as elemental, i.e. on an array of arguments of the expected type.
userHelp¶
zonesUsedInDeclarations¶
-
public BoolVector
zonesUsedInDeclarations
¶ The vector of all the zones of all the variables that are used in the declarations part, e.g. as dimension declarator.
Constructors¶
Methods¶
absorb¶
absorbAndDeleteUnit¶
addBlock¶
addDeadTree¶
addDerivedSymbolTable¶
-
public void
addDerivedSymbolTable
(SymbolTable symbolTable)¶ Adds a SymbolTable into the list of all SymbolTables belonging to this Unit. This routine must be called for the upmost SymbolTable’s first, so that these SymbolTables are ordered bottom-up.
addFormatTree¶
addInterfaceDecl¶
-
protected TapList<Unit>
addInterfaceDecl
(TreeProtocol inputStream, CallGraph callGraph, SymbolTable symbolTable)¶
addLostComment¶
addLowerLevelUnit¶
addNonFlowInstruction¶
-
public void
addNonFlowInstruction
(Instruction instr)¶
addParentClass¶
allBlocks¶
allCallees¶
-
public TapList<Unit>
allCallees
()¶ - Returns
the TapList of all computation Unit’s recursively called by “this” Unit. The returned list is ordered, so that each caller appears before its callees. In case of recursivity loops, no Unit appears twice. The first Unit in the list is “this” unit. The result doesn’t contain non-computation Units such as modules, varFunctions, interfaces…
allCalleesMulti¶
allCalleesMultiAvoiding¶
allCallers¶
allCallersMulti¶
allocateDeclaredZones¶
-
protected void
allocateDeclaredZones
(int[] firstZones, boolean staticMemory, TapList<ZoneInfo> toAllocatedZones)¶ Allocates the Zone numbers for the declared variables in this Unit, then (except if on a package) recursively for the sub-units declared locally.
- Parameters
firstZones – the next available zone numbers, for (anyType, int, real, ptr)
staticMemory – when true, allocate only the “static” zones of this Unit, i.e. those of the MODULE variables, the CLASS static variables, the various sort of remanent variables…
toAllocatedZones – collects the ordered list of ZoneInfo created (in decreasing rank order). This argument is used only when staticMemory==true. Otherwise pass null.
blocksFromBitVector¶
-
public TapList<Block>
blocksFromBitVector
(BoolVector bv)¶ - Returns
the ordered list of the Blocks that are designated by the given BoolVector “bv”. There is no verification that bv corresponds to a bitvector for blocks in this Unit.
bodySymbolTable¶
-
public SymbolTable
bodySymbolTable
()¶
buildControlDepsOf¶
-
public BoolVector
buildControlDepsOf
(Instruction instr, Block block)¶ Builds a new BoolVector containing true for all control zones that control the given Instruction (which is in the given Block), or null if empty
buildReturnTypeTree¶
-
public Tree
buildReturnTypeTree
(Block privateDeclBlock, TapList<SymbolDecl> externalTypes, ToObject<Tree> toNewDeclTree, TapList<Instruction> publicDeclarationsInstructions)¶ Builds the tree of the return type of this Unit.
callees¶
callerUnitNamesThatCall¶
callers¶
callersThatCall¶
classTypeSpec¶
-
public ClassTypeSpec
classTypeSpec
()¶
coherence¶
-
protected void
coherence
()¶ Computes and sets a number of utility information, most of them derived from the choice about loops done during the “findOptimalLoops” step.
Precisely, sets the following: - for the FlowGraph: allBlocks, nbBlocks - for each Block: rank, enclosingLoop, flowGraph, (TODO: successors, predecessors) boolean fields “isFGCycleHead” and “isFGCycleTail”. - for each LoopBlock: enclosingLoops, depth, entryBlocks, exitBlocks, entryArrows, exitArrows, and cycleArrows - for each Instruction: block - for each FGArrow: rank, iter, originInLevel, destinationInLevel This function requires that the following info is available: – topBlocks, list of top-level blocks – entryBlock and exitBlock – for each LoopBlock, the list of its immediately enclosed Blocks (field “inside”).
collectContainedUnits¶
collectImportForLater¶
-
protected void
collectImportForLater
(Instruction useInstr, SymbolTable symbolTable)¶
computeAllDominatorlikeInfo¶
-
protected void
computeAllDominatorlikeInfo
()¶ Compute usual informations on flowgraphs. Called in CallGraph.terminateTypesAndZones().
computeZonesUsedInDeclarations¶
-
protected void
computeZonesUsedInDeclarations
()¶ Initializes “zonesUsedInDeclarations”, the vector of all the zones of all the variables that are used in the declarations part, e.g. as dimension declarator.
copyUnitBody¶
copyUnitExceptSymbolTables¶
-
public Unit
copyUnitExceptSymbolTables
(CallGraph callGraph, Unit upperLevelUnit, Unit otherEnclosingUnitOfInterface)¶ Creates a PARTIAL copy of “this” Unit. Used by differentiation to create copied, non-differentiated Units. Copies the Flow Graph and Flow-Graph-related info.. For every allocation of an active variable, insert allocation of the differentiated variable. Does NOT create the copied SymbolTable’s.
deadTrees¶
dump¶
-
public void
dump
(int indent)¶ Prints in detail the contents of this Unit, onto TapEnv.curOutputStream().
- Parameters
indent – the amount of indentation to be used for this printing.
dumpDataFlow¶
-
public void
dumpDataFlow
(boolean dumpPointers, boolean dumpInOut, boolean dumpDeps, boolean dumpInside)¶ Prints a human-readable description of all the data-flow info found on this Unit.
encloses¶
enclosingUnits¶
entryBlock¶
-
public EntryBlock
entryBlock
()¶ - Returns
the entry block.
exportFunctionTypeSpec¶
-
public void
exportFunctionTypeSpec
()¶ Refine the FunctionTypeSpec of this Unit, using the types found in the function’s definition, but removing from these types the “Hint” information, and any other bit of info that refers to the inside of this Unit and should not be used outside.
exportOneArgumentType¶
-
protected void
exportOneArgumentType
(String argName, WrapperTypeSpec typeSpec)¶ Same as exportFunctionTypeSpec(), but only for the argument named “argName”, with the given “typeSpec”.
externalSymbolTable¶
-
public SymbolTable
externalSymbolTable
()¶ - Returns
the enclosing SymbolTable of this Unit.
fixImplicits¶
-
public void
fixImplicits
()¶ For each variable declared, but incompletely (e.g. there was a dimension T(100), but nothing else on T), uses the implicit type mechanism to terminate the typing of the variable in the SymbolTable.
focusToKind¶
-
public BoolVector
focusToKind
(BoolVector vectorAllKind, int kind)¶ Returns a translation of the given “vectorAllKind”, which is based on the ALLKIND zones numbering, into its subset dealing only with “kind” zones, and using the “kind” zones numbering.
focusToKind¶
-
public BoolMatrix
focusToKind
(BoolMatrix matrixAllKind, int kind)¶ Same as focusToKind(BoolVector), but on a BoolMatrix
focusToKind¶
-
public TapIntList
focusToKind
(TapIntList allKindZones, int kind)¶ Same as focusToKind(BoolVector), but on a TapIntList of allKind zones.
- Returns
those in the given ALLKIND zones that are actually of the required “kind”, as a new list of “kind” zones.
formalArgumentsNb¶
-
public int
formalArgumentsNb
()¶ - Returns
the number of formal arguments of the function associated to this Unit, as declared in the SymbolTable.
fortranStuff¶
-
public FortranStuff
fortranStuff
()¶ Special for treatment of Fortran specific info.
fragmentInOutCkp¶
-
public TapPair<BoolVector, BoolVector>
fragmentInOutCkp
(Block ckpBlock)¶ Returns the “possibly read” and “possibly written” info about one given checkpointed code fragment, here represented by its “main” Block “ckpBlock”
fromInclude¶
-
public Instruction
fromInclude
()¶
functionDeclHostSymbolTable¶
-
public SymbolTable
functionDeclHostSymbolTable
()¶ Returns the SymbolTable that contains the main FunctionDecl for this (function) Unit.
functionTypeSpec¶
-
public FunctionTypeSpec
functionTypeSpec
()¶ - Returns
the function type of this Unit.
generateHeaderParamsList¶
-
public TapList<Tree>
generateHeaderParamsList
(SymbolTable locationSymbolTable)¶ Generates the ordered list of Tree’s for the parameters of this Unit.
- Parameters
locationSymbolTable – the SymbolTable of the future location of the generated parameter list.
getElementalIntrinsicTypeConverter¶
getForwardDeclaration¶
-
public Instruction
getForwardDeclaration
()¶ - Returns
For C, for an EXTERNAL Unit, the C-style forward declaration instruction.
getFrontierOfParallelRegion¶
getImportedDecl¶
-
public SymbolDecl
getImportedDecl
(String name, int kind)¶ - Returns
null if no declaration is found.
getOrigUnitOfInterface¶
getSetNewParallelControls¶
-
public static TapList<Instruction>
getSetNewParallelControls
(TapList<Instruction> oldParallelControls, BlockStorage<Block> blockCorrespondence, BlockStorage<TapList<Instruction>> parallelControlsCorrepondence)¶ Transposes a given list of parallel controls which applies to an existing Unit into a new “mirror” list of parallel controls that applies to a new unit deduced from the existing one, following the correspondence “blockCorrespondence” from existing Unit’s Blocks to new Unit’s Blocks, and the already built new lists of parallel controls “parallelControlsCorrepondence”.
getUnitOfInterface¶
getUpperLevelClassUnit¶
hasArrayNotation¶
-
public boolean
hasArrayNotation
()¶ - Returns
true if we allow for array notation (“vector” notation) in this Unit.
hasDirective¶
hasGlobalArgs¶
-
protected boolean
hasGlobalArgs
()¶ - Returns
true when this Unit has global arguments that are neither the returned value nor in the list of formal arguments, and that may be used (R or W) by this Unit.
hasParamElemsInfo¶
-
public boolean
hasParamElemsInfo
()¶ - Returns
true when this Unit contains info on its elementary parameters.
hasPredefinedDerivatives¶
-
public boolean
hasPredefinedDerivatives
()¶ - Returns
true if this unit has predefined derivatives, e.g. from an external specification library.
hasSource¶
-
public boolean
hasSource
()¶ - Returns
true if this Unit knows its source code, i.e. Flow Graph, etc…
headTree¶
importedModules¶
importsSymbolTable¶
-
public SymbolTable
importsSymbolTable
()¶ - Returns
the imported context SymbolTable of this Unit.
inStdCIncludeFile¶
-
public boolean
inStdCIncludeFile
()¶ - Returns
true if this Unit comes from a C include file.
isAContext¶
-
public boolean
isAContext
()¶ - Returns
true when this Unit is (in particular) differentiated as a context to call diff code.
isAFunction¶
-
public boolean
isAFunction
()¶ - Returns
true if this Unit is a function, i.e. return type is not ‘void’.
isDiffPackage¶
-
public Boolean
isDiffPackage
()¶ - Returns
Boolean(true) if this Unit is a package (of the source CallGraph) for which there will be a differentiated package Unit. Also returns true if this Unit is this corresponding differentiated package Unit (of the differentiated Call Graph). This is set to true when the new module contains something new in addition to the contents of the primal, such as the declaration of some differentiated objects. Otherwise, this is also set to true when TapEnv.get().stripPrimalModules is false.
isElemental¶
-
public boolean
isElemental
()¶ - Returns
true for procedures that F90 can use as elemental, i.e. on an array of arguments of the expected type.
isFortran2003¶
-
public boolean
isFortran2003
()¶ - Returns
True if the programming language is FORTRAN2003 or upper.
isFortran9x¶
-
public boolean
isFortran9x
()¶ - Returns
True if the programming language is FORTRAN90 or upper.
isOutside¶
-
public boolean
isOutside
()¶ - Returns
True if this is an external, or an intrinsic, or an outside to be determined.
isOutsideTBD¶
-
public boolean
isOutsideTBD
()¶ - Returns
True if this is an outside Unit, maybe external, maybe intrinsic.
isPredefinedModuleOrTranslationUnit¶
-
public boolean
isPredefinedModuleOrTranslationUnit
()¶ - Returns
true if this is the MPI module.
isProcedureWithCode¶
-
public boolean
isProcedureWithCode
()¶ - Returns
True if this is a procedure Unit with its code exposed.
isTopInFile¶
-
public boolean
isTopInFile
()¶ - Returns
True if this is a top-level unit, i.e. immediately inside a file (aka Translation Unit).
isTranslationUnit¶
-
public boolean
isTranslationUnit
()¶ - Returns
True if this is a “Translation Unit” (i.e. the Unit for a file).
isUseAssociatedIntrinsic¶
-
public boolean
isUseAssociatedIntrinsic
(FunctionDecl intrinsicDecl)¶ - Returns
true si intrinsicDecl est declare’e dans un des modules importe’ pb: on ne peut pas passer par les importedSymbolTable car les intrinsic n’y sont pas: elles sont rajoutees au typeCheck des declarations du module qui est fait apres la copie des symbolTable importees TODO dans ce qui suit on ne tient pas compte des restrictions faites par les only ou renamed il faudrait affiner …
isVarFunction¶
-
public boolean
isVarFunction
()¶ - Returns
True if this is a Unit for a variable that holds a function.
lostComments¶
makeExternal¶
makeExternalOrIntrinsic¶
makeFlowGraph¶
-
public void
makeFlowGraph
(EntryBlock entryBlock, TapList<Block> givenAllBlocks, ExitBlock exitBlock, boolean finalGraph)¶ Sets the Flow Graph contents of this Unit. Takes a raw description of a Flow Graph, i.e. entryBlock, allBlocks, and exitBlock, condenses, simplifies, and normalizes it, and then puts the result as the new Flow Graph contents of this Unit. Assumes that all given Blocks are linked by the correct FGArrow’s. Normalization includes Block fusion when possible, loop nesting choice, detection of unreachable Blocks, and coherence enforcement. When this function completes, the Unit has its “allBlocks” and “topBlocks” computed, plus all the various fields related to the loop nesting in contained BasicBlock’s, LoopBlock’s, HeaderBlock’s, FGArrow’s, etc.
- Parameters
entryBlock – The EntryBlock of the given raw Flow Graph
givenAllBlocks – All the inside blocks of the given raw Flow Graph, unordered, EntryBlock and ExitBlock excluded
exitBlock – The ExitBlock of the given raw Flow Graph
finalGraph – true when this graph is not going to be analyzed any more, and is rather the final result of AD. In this case condensation will be a little more aggressive.
makeTransferMatrix¶
-
public BoolMatrix
makeTransferMatrix
(int whichKind)¶ - Returns
and builds BoolMatrix “transferMatrix”, which is used to translate public BoolMatrix’es to and from private ZoneMatrix’es, for infos that are travelling to and from the head of this unit.
makeVarFunction¶
middleNormalBlock¶
name¶
otherName¶
otherReturnVar¶
-
public VariableDecl
otherReturnVar
()¶ The alternate return variable name, if different from the function’s name.
paramElemPublicInfo¶
-
public PublicInfo
paramElemPublicInfo
(int i)¶ - Returns
the ZoneInfo of the i-th elementary parameter of this Unit.
paramElemZoneInfo¶
privateSymbolTable¶
-
public SymbolTable
privateSymbolTable
()¶ - Returns
the SymbolTable of this Unit’s top private symbols.
protectedSymbolTable¶
-
public SymbolTable
protectedSymbolTable
()¶ - Returns
the SymbolTable of this Unit’s top protected symbols.
publicSymbolTable¶
-
public SymbolTable
publicSymbolTable
()¶ - Returns
the SymbolTable of this Unit’s formal parameters or public symbolDecls.
rank¶
-
public int
rank
()¶ - Returns
The rank of this Unit, for access in UnitStorage’s, Positive number.
returnIndices¶
-
public TapIntList
returnIndices
(int kind)¶ - Returns
the list of the “kind” zones of the result of this Unit
setClassTypeSpec¶
-
public void
setClassTypeSpec
(ClassTypeSpec type)¶
setEntryBlock¶
-
public void
setEntryBlock
(EntryBlock eb)¶ Sets the entry block.
setExternalSymbolTable¶
-
public void
setExternalSymbolTable
(SymbolTable symbolTable)¶ Sets the enclosing SymbolTable of this Unit.
setForwardDeclaration¶
-
public void
setForwardDeclaration
(Instruction instr)¶ For C, for an EXTERNAL Unit, set the C-style forward declaration instruction.
setFragmentInOutCkp¶
-
public void
setFragmentInOutCkp
(Block ckpBlock, TapPair<BoolVector, BoolVector> info)¶
setFromInclude¶
-
public void
setFromInclude
(Instruction fromInc)¶
setFunctionTypeSpec¶
-
public void
setFunctionTypeSpec
(FunctionTypeSpec functionTypeSpec)¶ Sets the function type of this Unit.
setHasArrayNotation¶
-
public void
setHasArrayNotation
()¶ Allow for array notation (“vector” notation) in this Unit.
setImportsSymbolTable¶
-
public void
setImportsSymbolTable
(SymbolTable symbolTable)¶ Sets the imported context SymbolTable of this Unit.
setInStdCIncludeFile¶
-
public void
setInStdCIncludeFile
()¶ Declares that this Unit comes from a C include file.
setInitConstructorBlock¶
-
public void
setInitConstructorBlock
(InitConstructorBlock ib)¶ Sets the entry block.
setInterfaceDeclaration¶
-
public void
setInterfaceDeclaration
(Instruction instr)¶
setLanguageAndUp¶
-
public void
setLanguageAndUp
(int lang)¶ Sets the programming language, and recursively up on each enclosing Unit.
setLostComments¶
setOtherReturnVar¶
-
public void
setOtherReturnVar
(VariableDecl otherReturnVar)¶
setPredefinedModuleOrTranslationUnit¶
-
public void
setPredefinedModuleOrTranslationUnit
()¶ Declares that this is the MPI module.
setPrivateSymbolTable¶
-
public void
setPrivateSymbolTable
(SymbolTable symbolTable)¶ Sets the SymbolTable of this Unit’s top private symbols.
setProtectedSymbolTable¶
-
public void
setProtectedSymbolTable
(SymbolTable symbolTable)¶ Sets the SymbolTable of this Unit’s top protected symbols.
setPublicSymbolTable¶
-
public void
setPublicSymbolTable
(SymbolTable symbolTable)¶ Sets the SymbolTable of this Unit’s formal parameters or public symbolDecls.
setTranslationUnit¶
setTranslationUnitSymbolTable¶
-
public void
setTranslationUnitSymbolTable
(SymbolTable symbolTable)¶
setVarFunction¶
-
public void
setVarFunction
()¶ Declare this is a Unit for a variable that holds a function.
shortName¶
symbolTablesBottomUp¶
-
public TapList<SymbolTable>
symbolTablesBottomUp
()¶ - Returns
the list of all the SymbolTable’s belonging to this Unit. The list contains all SymbolTable’s created for this Unit or for one of its Blocks, ordered with the deepest SymbolTable’s first.
takesArgumentByValue¶
-
public boolean
takesArgumentByValue
(int parameterRank, int callerLanguage)¶ - Parameters
parameterRank – rank of this parameter, from 1 to nbArgs
- Returns
True if this unit, when called by another unit of language “callerLanguage”, gets the parameter of rank parameterRank by value.
testZoneOfControllerBlock¶
testZoneOfControllerWhere¶
-
public int
testZoneOfControllerWhere
(Instruction instr)¶ This instr is assumed to be a where, and therefore is a control. Returns the zone attached to this control
topBlocks¶
transferMatrix¶
-
public BoolMatrix
transferMatrix
(int whichKind)¶ - Returns
the transfer matrix between the public, external numbering of zones and the private, internal numbering specialized for type “whichKind”.
transferTransposed¶
-
public BoolMatrix
transferTransposed
(BoolMatrix matrix, int whichKind)¶ Computes the same as the product of this Unit’s transferMatrix of kind “whichKind” times the transpose of the given “matrix”, but without ever using the Unit’s transferMatrix because it is so large that we don’t want to build it. If the transferMatrix was computed, this should be equivalent to transferMatrix(whichKind).timesTransposed(matrix)
translateDeclaredToPublicZones¶
-
public TapIntList
translateDeclaredToPublicZones
(TapIntList declaredZones)¶ Translate a TapIntList of declared zones indices for “this” Unit into the TapIntList of corresponding published zone numbers for this Unit. zones which are local to this Unit are not published, and are therefore discarded.
translateToCallerZones¶
-
public TapIntList
translateToCallerZones
(TapIntList publicZones, Unit origUnit)¶ Translate the published zones from the given TapIntList “publicZones”, which are expressed with respect to “this” Unit, into the corresponding published zones expressed with respect to Unit “origUnit”. If one such zone is simply unknown in origUnit, then discard it.
translationUnit¶
translationUnitSymbolTable¶
-
public SymbolTable
translationUnitSymbolTable
()¶
turnExternal¶
-
public void
turnExternal
()¶ Turns a Unit which was created as a OUTSIDE_TBD, into an EXTERNAL.
turnIntrinsic¶
-
public void
turnIntrinsic
()¶ Turns a Unit which was created as a OUTSIDE_TBD or STANDARD, into an INTRINSIC.
typeCheck¶
-
public void
typeCheck
()¶ TypeChecks this Unit. TypeChecks each Instruction of this Unit with respect to its enclosing Block’s SymbolTable. Supposes all declarations are already in the SymbolTable, even when they were found later in the code, because all the declarations are inserted into the SymbolTable during a previous phase (cf FlowGraphBuilder). Adds implicit or error recovery declarations for undeclared variables, and creates Unit’s for undeclared routines called.
typeCheckInterface¶
-
protected void
typeCheckInterface
()¶ TypeChecks this interface. Checks coherence between interface and complete declaration if found.
typeCheckNameEqOptionalArguments¶
-
protected WrapperTypeSpec[]
typeCheckNameEqOptionalArguments
(SymbolTable symbolTable, Tree[] actualArgs, WrapperTypeSpec[] actualTypes, WrapperTypeSpec[] nameEqTypes, int rankOfFirstNameEq, Tree newCallTree, Tree optionalTree, ToBool callUsesNameEq)¶
typeCheckOptionalArguments¶
-
protected void
typeCheckOptionalArguments
(WrapperTypeSpec[] actualTypes, Tree newCallTree, Tree optionalTree, ToBool callUsesNameEq)¶
unfocusFromKind¶
-
public BoolVector
unfocusFromKind
(BoolVector vectorKind, int kind)¶ Reciprocal of focusToKind(). Fills the other zones with false
unitInOutCertainlyR¶
-
public BoolVector
unitInOutCertainlyR
()¶ - Returns
the vector of zones that are certainly completely read by this Unit.
unitInOutCertainlyW¶
-
public BoolVector
unitInOutCertainlyW
()¶ - Returns
the vector of zones that are certainly completely written by this Unit.
unitInOutN¶
-
public BoolVector
unitInOutN
()¶ In-Out data-flow info: vector of zones possibly/partly not accessed.
unitInOutPossiblyNotW¶
-
public BoolVector
unitInOutPossiblyNotW
()¶ - Returns
the vector of zones that are possibly not written by this Unit.
unitInOutPossiblyR¶
-
public BoolVector
unitInOutPossiblyR
()¶ - Returns
the vector of zones that are possibly read by this Unit.
unitInOutPossiblyRorW¶
-
public BoolVector
unitInOutPossiblyRorW
()¶ - Returns
the vector of zones that are possibly read or written by this Unit.
unitInOutPossiblyW¶
-
public BoolVector
unitInOutPossiblyW
()¶ - Returns
the vector of zones that are possibly written by this Unit.
unitInOutR¶
-
public BoolVector
unitInOutR
()¶ In-Out data-flow info: vector of zones possibly/partly read and not written.
unitInOutRW¶
-
public BoolVector
unitInOutRW
()¶ In-Out data-flow info: vector of zones possibly/partly read then written.
unitInOutW¶
-
public BoolVector
unitInOutW
()¶ In-Out data-flow info: vector of zones possibly/partly not read only written.
unitTBR¶
-
public BoolVector
unitTBR
()¶ TBR info: vector of zones possibly becoming TBR when going through this Unit, in other words zones used non-linearly and therefore needed in derivatives.
updateNestsOfBlocks¶
upperLevelUnit¶
zonesOfResult¶
-
public TapIntList
zonesOfResult
()¶ Computes the list of zones of the result of this (function) Unit.
- Returns
the zones of the result of this (function) Unit, null if no result.