PrimitiveTypeSpec¶
Constructors¶
Methods¶
addWith¶
-
protected TypeSpec
addWith
(WrapperTypeSpec type)¶ Composition rules for PrimitiveTypeSpec:
We start from the following definitions: ?INTEGER == INTEGER or REAL or COMPLEX ?REAL == REAL or COMPLEX ?COMPLEX == COMPLEX (therefore ?COMPLEX is useless) Composition rules are symmetric, but for implementation, we make them assymetric to keep/return the left type ("this") whenever possible. ([llh] Not sure this is a good choice. Maybe the result should share with neither left nor right type?) [code 0] is for other primitive types (Strings, Fortran Logicals, etc...) [code 1] INTEGER addWith INTEGER => INTEGER [code 1] INTEGER addWith ?INTEGER => ?INTEGER [code 1] INTEGER addWith REAL => REAL [code 1] INTEGER addWith ?REAL => ?REAL [code 1] INTEGER addWith COMPLEX => COMPLEX [code 2] ?INTEGER addWith ?INTEGER => ?INTEGER [code 2] ?INTEGER addWith REAL => ?REAL [code 2] ?INTEGER addWith ?REAL => ?REAL [code 2] ?INTEGER addWith COMPLEX => COMPLEX [code 3] REAL addWith REAL => REAL [code 3] REAL addWith ?REAL => ?REAL [code 3] REAL addWith COMPLEX => COMPLEX [code 4] ?REAL addWith ?REAL => ?REAL [code 4] ?REAL addWith COMPLEX => COMPLEX [code 5] COMPLEX addWith COMPLEX => COMPLEX
buildRealConstantZero¶
computeSize¶
-
protected int
computeSize
()¶ double:8 float:4 long:8 int:4 short:2 byte:1 char:2 boolean:4 reference:4.
differentiateTypeSpec¶
-
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)¶
generateTree¶
-
public Tree
generateTree
(SymbolTable symbolTable, TapList<SymbolDecl> dependsOn, TapList<SymbolDecl> shortNames, boolean useShortNames, TapList<TypeSpec> dejaVu)¶
intToReal¶
isAugmentedDouble¶
-
public boolean
isAugmentedDouble
()¶ - Returns
True if this type is the augmented type for overloading-based AD.
isProbablyRealOrComplex¶
-
public boolean
isProbablyRealOrComplex
()¶ - Returns
True if this type, possibly yet undefined, can/will be either “float” or “complex”.
isRealOrComplex¶
-
public boolean
isRealOrComplex
()¶ - Returns
True if this type is either “float” or “complex”.
localize¶
realToComplex¶
setPrimitiveTypeSize¶
-
protected void
setPrimitiveTypeSize
(int primitiveTypeSize)¶ The size in bytes of this primitive type.