.. java:import:: fr.inria.tapenade.utils ILLang .. java:import:: fr.inria.tapenade.utils TapPair .. java:import:: fr.inria.tapenade.utils TapTriplet .. java:import:: fr.inria.tapenade.utils ToBool .. java:import:: fr.inria.tapenade.utils Tree FunctionTypeSpec ================ .. java:package:: fr.inria.tapenade.representation :noindex: .. java:type:: public final class FunctionTypeSpec extends TypeSpec A type for functions and procedures, for instance (arg1T, arg2T...)→returnT. Fields ------ argumentsTypes ^^^^^^^^^^^^^^ .. java:field:: public WrapperTypeSpec[] argumentsTypes :outertype: FunctionTypeSpec The array of arguments types of this function type. returnType ^^^^^^^^^^ .. java:field:: public WrapperTypeSpec returnType :outertype: FunctionTypeSpec The return type of this function type. variableArgList ^^^^^^^^^^^^^^^ .. java:field:: public boolean variableArgList :outertype: FunctionTypeSpec True if this the type of a function with a variable number of arguments. Constructors ------------ FunctionTypeSpec ^^^^^^^^^^^^^^^^ .. java:constructor:: public FunctionTypeSpec() :outertype: FunctionTypeSpec Create a new function type, empty. FunctionTypeSpec ^^^^^^^^^^^^^^^^ .. java:constructor:: public FunctionTypeSpec(WrapperTypeSpec returnType) :outertype: FunctionTypeSpec Create a new function type, with the given return type. FunctionTypeSpec ^^^^^^^^^^^^^^^^ .. java:constructor:: public FunctionTypeSpec(WrapperTypeSpec returnType, WrapperTypeSpec[] argumentsTypes) :outertype: FunctionTypeSpec Create a new function type, with the given arguments types and return type. FunctionTypeSpec ^^^^^^^^^^^^^^^^ .. java:constructor:: public FunctionTypeSpec(WrapperTypeSpec returnType, WrapperTypeSpec[] argumentsTypes, boolean varArgList) :outertype: FunctionTypeSpec Create a new function type of variable arguments length, with the given arguments types and return type. FunctionTypeSpec ^^^^^^^^^^^^^^^^ .. java:constructor:: public FunctionTypeSpec(WrapperTypeSpec returnType, TapList paramsTypes) :outertype: FunctionTypeSpec Create a new function type, with the given arguments types and return type. Methods ------- baseTypeName ^^^^^^^^^^^^ .. java:method:: @Override protected String baseTypeName() :outertype: FunctionTypeSpec baseTypeSpec ^^^^^^^^^^^^ .. java:method:: @Override public WrapperTypeSpec baseTypeSpec(boolean stopOnPointer) :outertype: FunctionTypeSpec checkTypeSpecValidity ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected boolean checkTypeSpecValidity(TapList dejaVu) :outertype: FunctionTypeSpec complexAbsAmbiguous ^^^^^^^^^^^^^^^^^^^ .. java:method:: public static boolean complexAbsAmbiguous(String unitName, TypeSpec[] formalArgsTypes, TypeSpec[] actualArgsTypes) :outertype: FunctionTypeSpec Returns true when this unitName, called with actualArgsTypes that possibly match its formalArgsTypes, and therefore that seems to match the call site, actually does NOT match because it is an "abs" (absolute value) actually called on floats whereas this Unit is about "abs" called on complex. The fact that we need this test may be seen as a weakness or a bug in the actual type-checking process computeSize ^^^^^^^^^^^ .. java:method:: @Override protected int computeSize() :outertype: FunctionTypeSpec containsMetaType ^^^^^^^^^^^^^^^^ .. java:method:: @Override protected boolean containsMetaType(TapList dejaVu) :outertype: FunctionTypeSpec containsUnknownDimension ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public boolean containsUnknownDimension() :outertype: FunctionTypeSpec copy ^^^^ .. java:method:: @Override public TypeSpec copy() :outertype: FunctionTypeSpec Shallow copy of this function type. copyStopOnComposite ^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public TypeSpec copyStopOnComposite(Unit publishedUnit) :outertype: FunctionTypeSpec differentiateTypeSpec ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public WrapperTypeSpec differentiateTypeSpec(SymbolTable symbolTable, SymbolTable srcSymbolTable, int diffUnitSort, String fSuffix, boolean localDecl, boolean multiDirMode, ArrayDim multiDirDimensionMax, String hintArrayNameInText, String hintArrayNameInIdent, Tree hintArrayNameTree, Tree nameTree) :outertype: FunctionTypeSpec doUpdateAfterImports ^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public void doUpdateAfterImports(SymbolTable symbolTable, TapList dejaVu) :outertype: FunctionTypeSpec dump ^^^^ .. java:method:: @Override public void dump() throws java.io.IOException :outertype: FunctionTypeSpec finishLastMetaTypes ^^^^^^^^^^^^^^^^^^^ .. java:method:: protected static void finishLastMetaTypes(TapList> toAlreadySolved, SymbolTable symbolTable) :outertype: FunctionTypeSpec Replace remaining unsolved meta types with primitive types deduced from the name of the meta type e.g. "float..." → PrimitiveTypeSpec("float"). generateTree ^^^^^^^^^^^^ .. java:method:: @Override public Tree generateTree(SymbolTable symbolTable, TapList dependsOn, TapList shortNames, boolean useShortNames, TapList dejaVu) :outertype: FunctionTypeSpec isAFunction ^^^^^^^^^^^ .. java:method:: public boolean isAFunction() :outertype: FunctionTypeSpec :return: true when this has a non-void return type. isFunction ^^^^^^^^^^ .. java:method:: @Override public boolean isFunction() :outertype: FunctionTypeSpec localize ^^^^^^^^ .. java:method:: @Override public TypeSpec localize(TapList> toAlreadyCopied, ToBool containsMeta) :outertype: FunctionTypeSpec matchArgumentsTypes ^^^^^^^^^^^^^^^^^^^ .. java:method:: protected void matchArgumentsTypes(WrapperTypeSpec[] actualArgsTypes, Unit ctxtUnit, Unit calledUnit) :outertype: FunctionTypeSpec Instantiate this formal type of a function with the actual types "actualArgsTypes" of a particular call. This function formal type must be localized i.e. it is a copy that will not influence by unification the true, central, formal type of the function. matchesCall ^^^^^^^^^^^ .. java:method:: public boolean matchesCall(TypeSpec callResultType, TypeSpec[] callArgTypes) :outertype: FunctionTypeSpec Tests that this function type can be called with the given actual types, i.e. the arguments number matches and each arg formal type is larger than (i.e. is more general than, or "contains", or could receive) the actual arg type. :param callResultType: The expected result type at call site. May be null. (not used at present) :param callArgTypes: The array of the actual arguments types at call site. May be null if unknown. :return: true if this function type matches the actual call, or may be made to match it by instantiating its "meta" types.. matchesCallExactly ^^^^^^^^^^^^^^^^^^ .. java:method:: public boolean matchesCallExactly(TypeSpec callResultType, TypeSpec[] callArgTypes) :outertype: FunctionTypeSpec sameTypes ^^^^^^^^^ .. java:method:: public boolean sameTypes(WrapperTypeSpec otherReturnType, WrapperTypeSpec[] otherArgumentsTypes) :outertype: FunctionTypeSpec setReturnTypeSpec ^^^^^^^^^^^^^^^^^ .. java:method:: public void setReturnTypeSpec(WrapperTypeSpec typeSpec, Tree declaratorI) :outertype: FunctionTypeSpec setWrappedType ^^^^^^^^^^^^^^ .. java:method:: @Override public void setWrappedType(TypeSpec type) :outertype: FunctionTypeSpec showType ^^^^^^^^ .. java:method:: @Override public String showType() :outertype: FunctionTypeSpec testComparesWith ^^^^^^^^^^^^^^^^ .. java:method:: @Override protected boolean testComparesWith(TypeSpec other, int comparison, TypeSpec toThis, TypeSpec toOther, TapList> dejaVu) :outertype: FunctionTypeSpec toString ^^^^^^^^ .. java:method:: @Override public String toString() :outertype: FunctionTypeSpec wrappedType ^^^^^^^^^^^ .. java:method:: @Override public TypeSpec wrappedType() :outertype: FunctionTypeSpec