Handling of other classes (excluding previous types):
CLASS_TYPE_MARK: when the original type mark is not generic, not outside
expanded and it is not a formal generic argument. Thus, this is
the most common case.
For TYPE_MARKs for which the is_static predicate is True, the Result is obviously Current
(e.g. "STRING" is the declaration_type of "STRING" and, as another example, "ARRAY[INTEGER]" is
the declaration_type of "ARRAY[INTEGER]").
Is it written one of: "BOOLEAN", "CHARACTER", "INTEGER", "INTEGER_8", "INTEGER_16", "INTEGER_32",
"INTEGER_64", "REAL_32", "REAL_64", "REAL", "REAL_80", "POINTER".
The POSITION of the first character of the Current type mark where it is originally
written.
Note that, even if has_been_specialized is True, the Result is the POSITION of the
originally written type mark (and not the position of the resolved type mark (when internally
memorized). Finally, In some very rare cases, the Result can be an is_unknownPOSITION.
An is_static type mark is a completely frozen one that cannot change because of inheritance or
because of some different generic derivation.
Here are some examples of is_static type marks: "STRING", "ARRAY[STRING]", "COLLECTION[INTEGER]",
"ANY", INTEGER_8, etc.
Assuming that E_ is a formal generic argument, here are some examples of non static
(i.e.is_static yields False) type marks: "E_", "ARRAY[E_]", "DICTIONARY[STRING,E_]". Also, are
non-static the following marks: "like Current", "like foo", etc.
For TYPE_MARKs for which the is_static predicate is True, the Result is obviously Current
(e.g. "STRING" is the declaration_type of "STRING" and, as another example, "ARRAY[INTEGER]" is
the declaration_type of "ARRAY[INTEGER]").
For "like Current" the declaration_type is "STRING" only and only if "like Current" is written
in the "string.e" file. When there is no generic constraint, formal generic arguments are replaced
with "ANY" (as an example, "ANY" is the declaration_type of "E_" when "E_" is written in class
"array.e"). In case of a generic constraint, this generic constraint is used in place of "ANY" for
formal generic argument (as an example, the declaration_type of a "HASHED_DICTIONARY[V_,K_]" type
mark written inside class "hashed_dictionary.e" is "HASHED_DICTIONARY[ANY,HASHABLE]").
As checked in the require assertion, Current is written in new_type's base class.
Also note that
we have decided to keep in the Result all the information which is available in the original
text source. Because of declaration list of the form "x, y, z: FOO", note that specialize_*
feature may be called more than once with the same new_type argument.
Is it written one of: "BOOLEAN", "CHARACTER", "INTEGER", "INTEGER_8", "INTEGER_16", "INTEGER_32",
"INTEGER_64", "REAL_32", "REAL_64", "REAL", "REAL_80", "POINTER".
Type Mark | Handled by Class ----------------------------------------------- BOOLEAN | BOOLEAN_TYPE_MARK CHARACTER | CHARACTER_TYPE_MARK INTEGER_8 | INTEGER_TYPE_MARK INTEGER_16 | INTEGER_TYPE_MARK INTEGER_32 | INTEGER_TYPE_MARK INTEGER | INTEGER_TYPE_MARK INTEGER_64 | INTEGER_TYPE_MARK REAL_32 | REAL_TYPE_MARK REAL_64 | REAL_TYPE_MARK REAL | REAL_TYPE_MARK REAL_80 | REAL_TYPE_MARK POINTER | POINTER_TYPE_MARK ANY | ANY_TYPE_MARK STRING | STRING_TYPE_MARK ARRAY[FOO] | ARRAY_TYPE_MARK NATIVE_ARRAY[BAR] | NATIVE_ARRAY_TYPE_MARK TUPLE | EMPTY_TUPLE_TYPE_MARK TUPLE[FOO] | NON_EMPTY_TUPLE_TYPE_MARK ROUTINE ... | AGENT_TYPE_MARK PROCEDURE ... | AGENT_TYPE_MARK FUNCTION ... | AGENT_TYPE_MARK PREDICATE ... | AGENT_TYPE_MARKHandling of other classes (excluding previous types):