|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since I have established (no small effort, this) that there is no need
for certain important flags to be mutable for the entire lifetime of a
symbol, I have codified this knowledge by moving it out of the flags
entirely and into the inheritance hierarchy where its constant nature
can find true happiness.
AliasTypeSymbol ... it's an alias (forever!)
AbstractTypeSymbol ... it's an abstract type (forever!)
The only time DEFERRED is inspected is if the generic creation function
is called (e.g. "newTypeSymbol", not "newAliasType") in which case the
presence of the flag is used to determine which symbol to create. This
is mostly for legacy support.
Certain symbols were being created inconsistently with the others. Now
every symbol is created by invoking a creation method on the owner, with
the exception of FreeVar. I changed the owner of those from RootClass
to NoSymbol because there is no reason for them to pollute the symbol
hierarchy at the root.
The signature of cloneSymbolImpl is now
def cloneSymbolImpl(owner: Symbol, newFlags: Long): Symbol
There is an overload with the old signature which calls that one with no
flags. With this step, every symbol creation in trunk is performed with
knowledge of the initial flags, opening the door to many optimizations
in the Symbol and Type logic, not to mention boosting my sanity by at
least five sanity points.
|