InterfaceDecl¶
-
public final class
InterfaceDecl
extends SymbolDecl¶ 3 different interfaces declarations exist in Fortran90:
1/ Simple interface block to provide an explicit interface to an external of dummy procedure, this interface has no associated name.
interface function f(t) ... end function f end interface
cf nonRegression/set06/v222.
2/ Interface used for overloading with several interface bodies, with a generic name. The associated InterfaceDecl contains a list of FunctionDecl, its symbol is the generic name.
interface name function f1(t) ... end function f1 ... function fn(t) ... end function fn end interface
cf nonRegressions/set04/v032.
3/ Interface used for overloading with several procedure names, with a generic name.
interface g module procedure sg, dg end interface
The associated InterfaceDecl contains a list of String. cf nonRegressions/set04/v046.
The declaration of the interface is contained in an Instruction. The root Tree operator is interfaceDecl:
interfaceDecl -> OptExpression Interfaces OptExpression; Interfaces ::= interfaces; interfaces -> Interface * ...; Interface ::= interface moduleProcedure;
OptExpression.1 contains the name of the interface (2/ and 3/) or none (1/). interface operator contains the header of a function as described in 1/ and 2/ moduleProcedure operator contains a list of strings as described in 3/
In 1/, the InterfaceDecl symbol is the name of the contained procedure. In 2/ and 3/, the InterfaceDecl symbol is the name of the interface.
Fields¶
definitionSymbolTable¶
-
protected SymbolTable
definitionSymbolTable
¶ symbolTable containing the definition of this interface null corresponds to the rootSymbolTable.
formalArgRank¶
-
public int
formalArgRank
¶ for a function passed as formal parameter, its rank in the parameters list. From 1 up (special 0 for result).
functionDecls¶
-
public TapList<FunctionDecl>
functionDecls
¶ The FunctionDecl’s grouped by this InterfaceDecl.
Constructors¶
InterfaceDecl¶
-
protected
InterfaceDecl
(Tree identTree, FunctionDecl functionDecl, SymbolTable symbolTable, Unit containerUnit)¶
Methods¶
addInInterfaceDecl¶
-
protected void
addInInterfaceDecl
(FunctionDecl functionDecl, Unit enclosingUnit)¶
findFunctionDecl¶
-
public FunctionDecl
findFunctionDecl
(WrapperTypeSpec[] types, WrapperTypeSpec resultType, Tree callTree)¶
findOneFunctionDecl¶
-
protected FunctionDecl
findOneFunctionDecl
(WrapperTypeSpec[] types, Tree callTree)¶
functionDecl¶
-
protected FunctionDecl
functionDecl
()¶
mustHaveADiff¶
-
public boolean
mustHaveADiff
(ADActivityAnalyzer activityAnalyzer)¶