TypeSpec

public abstract class TypeSpec

Abstract class, parent of all classes that actually specify a type. All type classes derive from TypeSpec.

Fields

TARGET

public static final String TARGET

compare_debug_indent

protected static int compare_debug_indent

Current indentation in debug display of the progress of comparesWith() comparison.

diffFromTypeDecl

public TypeDecl diffFromTypeDecl

diffTypeDeclSymbolHolder

public NewSymbolHolder diffTypeDeclSymbolHolder

When this TypeSpec is in fact a differentiated type, this field holds the NewSymbolHolder of the name of this differentiated type.

diffTypeSpec

public WrapperTypeSpec diffTypeSpec

Constructors

TypeSpec

protected TypeSpec(int kind)

Creation.

Parameters
  • kind – The kind of this type, may be in strange cases UNKNOWNTYPE, ACTUALTYPE, METATYPE, WRAPPERTYPE, also still bizarre NAMEDTYPE but this may disappear, otherwise belonging to {VOIDTYPE, LABELTYPE, PRIMITIVETYPE, MODIFIEDTYPE, ENUMTYPE, POINTERTYPE, ARRAYTYPE, COMPOSITETYPE, FUNCTIONTYPE}.

Methods

acceptsMultiDirDimension

public boolean acceptsMultiDirDimension()
Returns

true when the new dimension added by multiDirMode can apply to this typeSpec, instead of at some deeper level e.g. included in composite or pointer types.

addDeclaratorModifiers

public static Tree addDeclaratorModifiers(Tree declaratorTree, TapList<String> modifiers)

Utility for generateTree(): modifies and/or returns declaratorTree to add the given modifiers.

addDiffTypeSpec

protected void addDiffTypeSpec(SymbolTable symbolTable, SymbolTable srcSymbolTable)

Only for association by address.

addInTypeDeclNames

public void addInTypeDeclNames(Unit unit, String name)

addMultiDirDimension

protected TypeSpec addMultiDirDimension(ArrayDim dimension)

addTypeModifiers

public static Tree addTypeModifiers(Tree typeTree, TapList<Tree> modifiers)

Utility for generateTree(): modifies and/or returns typeTree to add the given modifiers.

addUsedSymbolsInType

public void addUsedSymbolsInType(TapList<SymbolDecl> dependsOn, SymbolTable symbolTable)

Augments the given (hatted) list dependsOn with the SymbolDecl’s of all symbols used in this type.

baseTypeName

protected abstract String baseTypeName()
Returns

a name for the base type of this type, when this makes sense.

baseTypeSpec

public WrapperTypeSpec baseTypeSpec(boolean stopOnPointer)
Parameters
  • stopOnPointer – when false, will also go down into pointers destination type

Returns

the base type found.

build

public static WrapperTypeSpec build(Tree typeTree, SymbolTable symbolTable, Instruction instruction, TapList<SymbolDecl> toTypeUsedSymbols, TapList<String> toSymbolDeclInfos, TapList<String> toSymbolDeclAccess, ToBool isPointer, WrapperTypeSpec currentBuiltTypeSpec)

Build a TypeSpec from a tree.

Parameters
  • typeTree – tree representing a type.

  • symbolTable – current symbolTable.

  • instruction – Instruction containing the type definition.

  • toTypeUsedSymbols – types used in the definition.

  • toSymbolDeclInfos – type modifiers.

  • toSymbolDeclAccess – type access modifiers.

  • isPointer – pointer or not pointer.

  • currentBuiltTypeSpec – for recursive type definition.

Returns

a typeSpec.

buildConstantOne

public Tree buildConstantOne()
Returns

a Tree that is a “one” of this type, whenever it is defined.

buildConstantZero

public Tree buildConstantZero()
Returns

a Tree that is a “zero” of this type, whenever it is defined. For pointer type, this is the null pointer.

canCompare

protected static boolean canCompare(WrapperTypeSpec type1, WrapperTypeSpec type2)

checkTypeSpecValidity

protected boolean checkTypeSpecValidity(TapList<TypeSpec> dejaVu)

Checks that this type is valid, i.e. contains no gaping hole and is not circular.

cloneAsUndefinedNumeric

protected TypeSpec cloneAsUndefinedNumeric(boolean undefined)
Returns

a copy of this type with “undefinedNumeric” in its numeric leaf type set to the given boolean “undefined”.

collectUsedTrees

public void collectUsedTrees(TapList<Tree> toUsedTrees, TapList<TypeSpec> toDejaVu)

Collects into toUsedTrees all the symbol Trees used in this type.

combineWith

protected TypeSpec combineWith(TypeSpec newActualTypeSpec, SymbolTable symbolTable)

Combination of two TypeSpec’s. Combines, when possible, this current TypeSpec with a new one “newActualTypeSpec”. If the combination succeeds, returns the combined TypeSpec. Otherwise returns null. Warning, both this and newActualTypeSpec may be modified. Warning: source language dependent!!!!

comparesWith

public boolean comparesWith(TypeSpec other, int comparison, TypeSpec toThis, TypeSpec toOther, TapList<TapPair<TypeSpec, TypeSpec>> dejaVu)

Perform “comparison” of this type with an “other” type, with possible type inference by side-effect.

Parameters
  • other – The other type, with respect to which comparison is made.

  • comparison – the comparison performed. See possible comparisons in the comments around showComparison() If comparison allows for type inference, then the types wrapped immediately around this and other should be provided in toThis and toOther, otherwise type inference will not be done at the top level of types.

  • toThis – the TypeSpec immediately containing this type. Useful only if type inference is requested, otherwise may be null.

  • toOther – the TypeSpec immediately containing the other type. Useful only if type inference is requested, otherwise may be null.

  • dejaVu – the list of type pairs already being compared as “this” vs. “other”, and being the destination of some pointer type. This classically avoids infinite loops in cycles of types.

Returns

true if this type compares well according to “comparison” with the “other” type.

computeSize

protected int computeSize()

Utility for size(). Use size() instead.

containsAPointer

public boolean containsAPointer()
Returns

true if this type is a pointer or at least contains a pointer field.

containsArray

public boolean containsArray()

containsMetaType

protected boolean containsMetaType(TapList<TypeSpec> dejaVu)
Parameters
  • dejaVu – List of dejaVu sub-types, to avoid looping. Pass null at call.

Returns

true when some component of this type is an unsolved TypeSpec, because it contains either a MetaTypeSpec or an unknown array (or pointer) dimension.

containsUndefinedType

public boolean containsUndefinedType()

containsUnknownDimension

public boolean containsUnknownDimension()
Returns

true when this type has at least one dimension which is not known explicitly.

copy

public TypeSpec copy()
Returns

a copy of this type, copying recursively inside the nested types tree structure, but stopping copy (i.e. returning the same objects) for the fields of a CompositeTypeSpec, the sub-types of a FunctionTypeSpec, or for MetaTypeSpec, EnumTypeSpec, NamedTypeSpec, VoidTypeSpec.

copyStopOnComposite

public abstract TypeSpec copyStopOnComposite(Unit publishedUnit)
Parameters
  • publishedUnit – when non-null, remove from this type all information that relates to local data of publishedUnit, i.e. that is not visible from outside publishedUnit

Returns

a copy of this type, copying recursively inside the nested types tree structure, but stopping copy (i.e. returning the same objects) for (WrapperTypeSpec’s on) CompositeTypeSpec, the sub-types of a FunctionTypeSpec, or for MetaTypeSpec, EnumTypeSpec, NamedTypeSpec, VoidTypeSpec

createOrGetDiffTypeDeclSymbolHolder

protected void createOrGetDiffTypeDeclSymbolHolder(SymbolTable diffSymbolTable, WrapperTypeSpec diffTypeSpec, String fSuffix)

only for association By Address.

cumulActiveParts

protected void cumulActiveParts(TapList diffInfos, SymbolTable symbolTable)

Accumulates into this type and into its sub-types, the given information about which types parts (e.g. named types, record fields..) are used as active, which implies that they must have a differentiated counterpart in the differentiate type of this type.

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)
Returns

the differentiated counterpart of this type, which is assumed differentiable. Returning null means that the differentiated counterpart is exactly the same as this type. The returned type is different from “this” either if the differentiated element type is different, or if dimensions must change, e.g. vector mode, or F90 using dimension “*” which must be replaced by “:” in the diff type.

dispatchModifiers

protected static int dispatchModifiers(Tree[] modifiersTrees, Tree modifiedTree, TapPair<Tree, ArrayDim[]> sizeAndDims, ToBool isPointer, TapList<String> toSymbolDeclInfos, TapList<String> toSymbolDeclAccess, TapList<SymbolDecl> toTypeUsedSymbols, Tree typeTree, Instruction instruction, SymbolTable symbolTable)

Dispatch modifiers: – “type size” modifiers are combined into one “sizeTypeModifier”, that will be stored eventually in the returned ModifiedTypeSpec – “signed” and “unsigned” modifiers are collected into int “typeSign” (default 0) which will be stored eventually in the returned ModifiedTypeSpec (similarly to “type size” modifiers) – “dimension” modifiers are collected into “dimensions” and used eventually to build an ArrayTypeSpec layer in the returned ModifiedTypeSpec – “pointer” modifiers sets boolean “isPointer”, that will be used eventually to add a pointer layer at the appropriate location in the SymbolDecl’s type. – “accessDecl(bind,…)” modifiers are directly attached to the Instruction.tree – “restrict”, “const”… modifiers are collected into “toSymbolDeclAccess” and will be stored eventually into the “subAccessInfo” of the enclosing TypeSpec or of the SymbolDecl – all other modifiers are collected into “toSymbolDeclInfos”, that will be stored eventually into the “extraInfo” of the SymbolDecl (but maybe they should all be treated like “const” etc ?)

doUpdateAfterImports

protected void doUpdateAfterImports(SymbolTable symbolTable, TapList<TypeSpec> dejaVu)

Utility for updateAfterImports(). Don’t use otherwise!

dump

public void dump()

Prints in detail the contents of this type, onto TapEnv.curOutputStream().

elementType

public WrapperTypeSpec elementType()
Returns

the type of the elements of the deepest array type in this type.

equalsCompilDep

public boolean equalsCompilDep(TypeSpec other)
Returns

true if this type is equal to the other, in a rather laxist way since this uses knowledge about the specific compiler/platform default choices.

equalsCompilDepNeglectLengthes

public boolean equalsCompilDepNeglectLengthes(TypeSpec other)
Returns

true if this type is equal to the other, in a laxist way that compares the number of dimensions but not their lengthes, and additionally accepts vectorial notation (i.e. array:this vs scalar:other), and in the “compile-dep” way regarding primitive type sizes.

equalsCompilIndep

public boolean equalsCompilIndep(TypeSpec other)
Returns

true if this type is equal to the other, in a rather strict way since equality must remain whatever the specific compiler/platform default choices.

equalsLiterally

public boolean equalsLiterally(TypeSpec other)
Returns

true if this type is litterally equal to the other. When dimensions are given after a dimension of some reference array (ArrayDim.refArrayTree), equality is true iff the reference array and dimension are the same.

equalsNeglectSizes

public boolean equalsNeglectSizes(TypeSpec other)
Returns

true if this type is equal to the other, in a very laxist way since we don’t care about different type precision at the leaf primitive types, and additionally accept vectorial notation (i.e. array:this vs scalar:other).

equalsNeglectSizesNeglectLengthes

public boolean equalsNeglectSizesNeglectLengthes(TypeSpec other)
Returns

true if this type is equal to the other, in a laxist way that compares the number of dimensions but not their lengthes and additionally accepts vectorial notation (i.e. array:this vs scalar:other), and not caring about different type precision at the leaf primitive types.

findAlreadyCopiedType

protected TypeSpec findAlreadyCopiedType(TapList<TapTriplet<TypeSpec, TypeSpec, Boolean>> toAlreadyCopied, ToBool containsMeta)

findFunctionTypeSpecUnderTypeSpec

protected static FunctionTypeSpec findFunctionTypeSpecUnderTypeSpec(WrapperTypeSpec typeSpec)

findShortName

protected String findShortName(TapList<SymbolDecl> dependsOn, TapList<SymbolDecl> shortNames)

Utility for generateTree(): finds a short name for this type, if it exists.

genTypeDeclName

protected String genTypeDeclName()

generateDeclaratorTree

public static Tree generateDeclaratorTree(WrapperTypeSpec stoppingTypeSpec, TapList<SymbolDecl> declaredTypes, Tree declarator, WrapperTypeSpec typeSpec)
Returns

a declarator tree built by wrapping declarator layers around the given declarator tree “declarator”, each added declarator layer corresponding to the successive nested type layers in “typeSpec”, but stopping when reaching the type layer “stoppingTypeSpec”.

generateTree

public Tree generateTree(SymbolTable symbolTable, TapList<SymbolDecl> dependsOn, TapList<SymbolDecl> shortNames, boolean useShortNames, TapList<TypeSpec> dejaVu)

Generate a Tree for this type.

Parameters
  • symbolTable – The SymbolTable context where the generated Tree will appear.

  • dependsOn – ?used during findShortName()?

  • shortNames – The list of types that have a short name.

  • useShortNames – When true, if this type has a short name in “shortNames”, the generated Tree will simply use that name. Set it to false to avoid silly “typedef truc=truc ;”.

Returns

A Tree that stands for this type.

getAllDimensions

public TapList<ArrayDim> getAllDimensions()
Returns

the list of all dimensions of this type and its nested types, in the C-like order i.e. outside/slow dimensions first. Doesn’t go into pointers nor into function or composite types.

getRenamedTypeDeclName

public static String getRenamedTypeDeclName(TapList<TapPair<Unit, String>> typeDeclNames, Unit inUnit)

getRenamedTypeDeclName

public String getRenamedTypeDeclName(Unit inUnit)

hasUndefinedSize

protected boolean hasUndefinedSize()

ignoreTypeDeclName

protected static boolean ignoreTypeDeclName(String typeDeclName)

intToReal

public TypeSpec intToReal(TapList<TapPair<TypeSpec, TypeSpec>> dejaVu, SymbolTable symbolTable)

When this type is non-differentiable (e.g. integer), returns a copied type with integers replaced with reals. Otherwise returns the original type.

Parameters
  • dejaVu – List of dejaVu sub-types, to avoid looping. Pass null at call.

isA

public static boolean isA(TypeSpec type, int kind)
Parameters
  • kind – may be ACTUALTYPE, ARRAYTYPE, FUNCTIONTYPE, LABELTYPE MOFIFIEDTYPE, PRIMITIVETYPE, COMPOSITETYPE, POINTERTYPE, VOIDTYPE, METATYPE (defined in SymbolTableConstants).

Returns

true when this TypeSpec is of the given kind “testKind” Skips over layers of WrapperTypeSpec’s.

isAnIOTypeSpec

protected boolean isAnIOTypeSpec(SymbolTable symbolTable)
Returns

true when this type is the C predefined type FILE or IO_FILE.

isArray

public boolean isArray()
Returns

true if this is an array type.

isAugmentedDoubleBase

public boolean isAugmentedDoubleBase()
Returns

true if the base of this type is the augmented type for overloading-based AD.

isBooleanBase

public boolean isBooleanBase()
Returns

true if the base of this type is “boolean”.

isCharacter

public boolean isCharacter()
Returns

true if this type is a character type.

isComplexBase

public boolean isComplexBase()
Returns

true if the base of this type is “complex”.

isDifferentiablePlainType

public boolean isDifferentiablePlainType()
Returns

true if this type is a PRIMITIVETYPE, possibly wrapped in MODIFIEDTYPE’s, and its primitive type is differentiable.

isDifferentiableType

public static boolean isDifferentiableType(TypeSpec actualTypeSpec)

True if the given type is possibly differentiable i.e. contains some continuous component such as a float. This is weaker than isDifferentiated(), which checks that at least one variable of this type has been found active.

Parameters
  • actualTypeSpec – the given type

Returns

true if the given “actualTypeSpec” is possibly differentiable.

isDifferentiated

public boolean isDifferentiated(TapList<TypeSpec> dejaVu)
Parameters
  • dejaVu – List of dejaVu sub-types, to avoid looping. Pass null at call.

Returns

true if at least one variable with this type has at least one active part. This is stronger than isDifferentiableType() i.e. this.isDifferentiated() ⇒ isDifferentiableType(this).

isFunction

public boolean isFunction()
Returns

true if this type is a function type.

isIntegerBase

public boolean isIntegerBase()
Returns

true if the base of this type is “integer”.

isNamedType

public boolean isNamedType()
Returns

true if this is a plain named type, i.e. a placeholder for a type that should be defined elsewhere, later during building the representation.

isNumericBase

public boolean isNumericBase()
Returns

true if the base of this type is numeric, which means either integer or real or complex (or boolean or char in C).

isPointer

public boolean isPointer()
Returns

true if this type is a pointer type.

isProbablyRealOrComplexBase

boolean isProbablyRealOrComplexBase()
Returns

true if the base of this type is either “float” or “complex” or a yet undefined type which can/will be only “float” or “complex”.

isRealBase

public boolean isRealBase()
Returns

true if the base of this type is “float”.

isRealOrComplexBase

public boolean isRealOrComplexBase()
Returns

true if the base of this type is either “float” or “complex”, which means a type that may be differentiated.

isScalar

public boolean isScalar()

isString

public boolean isString()
Returns

true if this type is a string type, i.e. a one-dimensional array of characters.

isTarget

public boolean isTarget()
Returns

true if this type is declared as a pointer “target”.

isUndefinedNumeric

protected boolean isUndefinedNumeric()

kind

public int kind()

The particular type sub-kind of this TypeSpec.

localize

protected TypeSpec localize(TapList<TapTriplet<TypeSpec, TypeSpec, Boolean>> toAlreadyCopied, ToBool containsMeta)
Parameters
  • toAlreadyCopied – the hatted A-list from each original sub-type to its copy plus a boolean which is true iff the original sub-type contains a meta Type.

  • containsMeta – contains true upon return iff this type contains a Meta sub-type. We assume containsMeta is initialized upon false upon call.

Returns

the copied type.

modifiedBaseTypeSpec

public WrapperTypeSpec modifiedBaseTypeSpec()
Returns

the ModifiedTypeSpec around the base of this type. If no ModifiedTypeSpec around, returns the same as baseTypeSpec(false).

needsADiffType

public boolean needsADiffType(TapList<TypeSpec> dejaVu)
Parameters
  • dejaVu – TapList of TypeSpec

Returns

true iff there must be a differentiated type for this type, different from this type. For instance a record with all fields passive need no diff type, and a record with all fields completely active, do not need a diff type either because the original type also works as well. Also note that in modes associationByAddress, float types and also records with all fields completely active DO need a diff type, because float type is replaced by a special type aka “aDouble”.

nestedLevelType

public TypeSpec nestedLevelType()
Returns

the nested type, or null when there is no meaningful nested type.

peelArrayDimsAroundComposite

protected static TapPair<WrapperTypeSpec, ArrayDim[]> peelArrayDimsAroundComposite(WrapperTypeSpec typeSpec)

Peels all array dimensions around the given type, until it reaches a composite type or a leaf type.

Returns

a TapPair of (1) the bottom composite or leaf type found and of (2) the array of ArrayDim objects that were found on the way.

peelDimensionsTo

public TypeSpec peelDimensionsTo(TypeSpec type, TypeSpec toType, TapList<ArrayDim> toDimensions)

peelPointer

protected TypeSpec peelPointer()

Assuming that this type is a pointer type,

Returns

the inside pointed type.

peelSizeModifier

public static WrapperTypeSpec peelSizeModifier(WrapperTypeSpec typeSpec, ToObject<ModifiedTypeSpec> toModifiedType)

peelSizeModifiersTo

protected TypeSpec peelSizeModifiersTo(TypeSpec type, TypeSpec toType, ToObject<Tree> toModifierTree, ToObject<ModifiedTypeSpec> toModifiedTypeSpec, boolean remainLitteral)
Parameters
  • toModifiedTypeSpec – when given non-null, contains upon exit the deepest ModifiedTypeSpec found.

peelWrapperAndModified

protected TypeSpec peelWrapperAndModified(TypeSpec typeSpec)

peelWrapperAndModifiedTo

protected TypeSpec peelWrapperAndModifiedTo(TypeSpec type, TypeSpec toType)

peelWrapperTo

protected TypeSpec peelWrapperTo(TypeSpec type, TypeSpec toType)

preciseDimensions

protected TypeSpec preciseDimensions(TypeSpec complementType, TapList<TapPair<TypeSpec, TypeSpec>> dejaVu, SymbolTable symbolTable)

Try and refine the dimension information inside this type, by matching it with the given complementType, which has the same structure.

Parameters
  • dejaVu – List of dejaVu sub-types, to avoid looping. Pass null at call.

precisionSize

public int precisionSize()
Returns

the size in bytes of this numeric type, or -1 for unknown, or -2, -3, or -4 for double,short,or quadruple.

realToComplex

protected TypeSpec realToComplex(TapList<TapPair<TypeSpec, TypeSpec>> dejaVu, WrapperTypeSpec complexTypeSpec)

receives

public boolean receives(TypeSpec other, TypeSpec toThis, TypeSpec toOther)

Test that this type can receive a value of the other type, performing type inference if needed and possible, and allowing array operations in the style of F90.

receivesNoInferenceNoVector

public boolean receivesNoInferenceNoVector(TypeSpec other)
Returns

true if this type can receive a value of the other type, but without allowing type inference and without allowing F90-style array notation.

receivesNoVector

public boolean receivesNoVector(TypeSpec other, TypeSpec toThis, TypeSpec toOther)
Returns

true it this type can receive a value of the other type, performing type inference if needed and possible, but without allowing array operations in the style of F90.

receivesNoVectorNeglectSizes

public boolean receivesNoVectorNeglectSizes(TypeSpec other, TypeSpec toThis, TypeSpec toOther)
Returns

true it this type can receive a value of the other type, performing type inference if needed and possible, and not caring about different type precision at the leaf primitive types, but without allowing array operations in the style of F90.

receivesVectorNeglectSizes

public boolean receivesVectorNeglectSizes(TypeSpec other)
Returns

true if this type can receive a value of the other type, without trying type inference, neglecting mismatches of array length and allowing array operations in the style of F90.

setHasUndefinedSize

protected void setHasUndefinedSize(boolean val)

setOrAddTypeDeclName

protected void setOrAddTypeDeclName(String name)

setTypeDeclName

protected void setTypeDeclName(String name)

setTypeDeclNames

public void setTypeDeclNames(TapList<TapPair<Unit, String>> tDeclNames)

setUndefinedNumeric

protected void setUndefinedNumeric(boolean value)

setWrappedType

public void setWrappedType(TypeSpec type)

shareActiveFields

protected void shareActiveFields(TypeSpec referenceType)

Make sure that this type shares the activity information of the given reference type. This is needed e.g when actual type and formal type of a procedure call are two a priori different types (of course such that formalType can “receives” actualType), and they both contain structs: the actual type must share the field activity information of the formal.

showComparison

public static String showComparison(int comparison)

showType

public String showType()
Returns

a String that shows this type, with the usual syntax of the current language.

size

public int size()
Returns

(and stores for later reference) the memory size in bytes occupied by objects of this type.

testAcceptsUnspecified

protected static boolean testAcceptsUnspecified(int comparison)

testAllowsVectorial

protected static boolean testAllowsVectorial(int comparison)

testComparesWith

protected abstract boolean testComparesWith(TypeSpec other, int comparison, TypeSpec toThis, TypeSpec toOther, TapList<TapPair<TypeSpec, TypeSpec>> dejaVu)

Really does the work of comparison at the current type level of “this”.

testHasInference

protected static boolean testHasInference(int comparison)

testIsEquals

protected static boolean testIsEquals(int comparison)

testIsReceives

protected static boolean testIsReceives(int comparison)

testIsReceivesWithInference

protected static boolean testIsReceivesWithInference(int comparison)

testLooksDimensionLength

protected static boolean testLooksDimensionLength(int comparison)

testSetEquals

protected static int testSetEquals(int comparison)

testTypesCompilDep

protected static boolean testTypesCompilDep(int comparison)

testTypesLitteral

protected static boolean testTypesLitteral(int comparison)

testTypesWithoutSize

protected static boolean testTypesWithoutSize(int comparison)

testUnsetInference

protected static int testUnsetInference(int comparison)

toString

public String toString()

typeDeclName

public String typeDeclName()

typeDeclNames

public TapList<TapPair<Unit, String>> typeDeclNames()

updateAfterImports

public void updateAfterImports(SymbolTable symbolTable, TapList<TypeSpec> dejaVu)

Updates this type with the full information available from the given “symbolTable” and from the other symbol tables that it imports. Example: a type may use a variable name (for size, dimension…) that was not known before all symbols from USE’d Modules have been imported.

weakenForInference

protected TypeSpec weakenForInference(int comparison)
Returns

a copy of this type where some details are left unspecified because type inference is unable to determine them for sure (for this sort of comparison).

wrappedType

public TypeSpec wrappedType()
Returns

wrappedType or elementType or destinationType or returnType.