| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Fix #453, patternMatcher should use ==
|
| |
| |
| |
| |
| | |
Also, added comments to the tpd select methods that explain how the data race
could arise and how to avoid it.
|
| |
| |
| |
| |
| |
| |
| | |
This aligns with the "-" instead of CamelCase convention for
the other command line options.
Also, enable -Yno-double-bindings for dotc_core.
|
| | |
|
|/
|
|
|
| |
It is no longer needed because companion classes are now tracked with
companion$ methods. It also causes unncessary inner classes reads.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Used to be "with fixed sym". Now it is: With initial symbol
as given in the serialized info.
It turns out the only previous uses of (TERM|TYPE)REFsymbol were
types that were made symbolic in self types. But exactly that caused
that problems in unpickling which we tried to workaround by changing
WithFixedSym#newLikeThis. And these fixes became less and less intuitive and
still could not solve the problem for good. Last hurdle was pickle-testing
all files in ast together.
It's much simpler to reserve (TERM|TYPE)REFsymbol for NamedTypes that have
an initial symbol. Like the previous "WithFixedSym" pickling, this avoids
inifinite recursions in pickling/extmethods.scala. But it also avoids problens
with unpickling ast/*.scala. The reason it is better is that it more accurately
models that types that exist before pickling.
This change also undoes previous changes to WithFixedSym#newlikeThis. Better to keep
the more restrictive contract for these.
|
|
|
|
|
|
|
|
| |
Simplify fully applied #Apply projections before comparing trees.
Such projections are now (correctly) simplified on unpickling
but persist in the original tree before pickling.
The discrepancy was uncovered by the last commit.
|
|
|
|
|
|
| |
isAbstractType was wrong because it did not follow through SHARED aliases.
This was masked before 1b1fb6e5cf7df42000e378c628c8411bce952eb0 but uncovered
afterwards.
|
|
|
|
|
|
|
|
|
|
|
| |
There was a spurious error when doing pickling tests with -YnoDoubleBindings
The test manifested itself when compiling `Trees` and `untpd`. The problem was
a sourious double assignment to the `untpd$` TypeRef. The problem was that
the old `untpd` symbol did get a runId of 3, because it was looked at immediately
before being overritten with the new symbol. So the system detected a race condition.
The new test looks at the denotations previous run id instead of the symbol's when
setting a denotation. That runId was still 2, so not real double binding occurred.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The symbol might be overridden, in which case the overriding
symbol should be chosen.
This was observered when trying to pickle test all of ast.
Compiling Trees and untpd together gave discrepancies involving
`untpd.dotty$tools$dotc$ast$Trees$$Instance$$T`. It was
found that the symbol referred to by that type refers
to the abstract type in Trees.Instance, not the alias in
untpd. The bad type was produced by an asSeenFrom of the
`WithFixedSym` type
`Instance.this.untpd.dotty$tools$dotc$ast$Trees$$Instance$$T`
as seen from `untpd`. The as seen from did not pick the new
instance in `untpd`.
|
|
|
|
|
|
|
|
|
| |
Do a normalizeClassRef immediately after parents are read. Not clear
whether this chanegs anything, but it's the prudent thing to do since
Namer behaves the same way.
The danger would be that between reading parents and normalizing refs
someone refers to an overridden param and gets the wrong type.
|
|
|
|
| |
For classes rhsIsEmpty is true, but they should not be Deferred.
|
|
|
|
|
|
| |
There were spurious InSuperCall flag due to the implicit addition
of InSuperCall in normalizeFlags. This addition is not necessary, because
inSuperCall is serialized.
|
|
|
|
|
| |
In the absence of semantic names, this is kludgey. But we need to do it because
otherwise the ExpandedName flag is not correctly set.
|
|
|
|
|
| |
Will now also re-normalize And/OrTypes because sometimes they
were not yet normalized before pickling.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
stillValid should always be tested at the phase where the initial
denotation is defined. If we do not do this we get false stale symbol errors.
Here is a scenario:
To `bringForward` `Predef$$ArrowAsscoc`, we check whether its initial denotation
has an owner which contains the denotation as one of its members. But if we do this
at a later phase (e.g. GenBCode), the owner of the initial denotation is Predef, but
Predef no longer contains ArraoAssoc - it lost the member at flatten.
With this fix we can run everything with -twice, except dotc_core. I left a comment what
goes wrong there.
|
|
|
|
|
| |
Same functionality achieved in a simpler way. Also, make sure
initial works for stale denotations that refer to some other cycle.
|
|
|
|
|
|
| |
The previous one caused a spurious error - I had compiled the config classes
into the config directory, resulting in a dotty directory in config. My mistake,
not the previous import list's. Still the new imports are much cleaner.
|
|
|
|
|
|
| |
Previous version read a prevDenot denotation of a potential root symbol.
If it then went on to replace the symbol instead the old one was already
read and polluted the caches, similar to what happens in last commit.
|
|
|
|
|
|
|
|
|
|
| |
syncWithParents explores the denotations of symbols that might yet to be entered
in the current run. If such a symbol is looked at in a new run before a new one
is entered, the validty period of the old denotation is extended to the new run
and consequently references to that symbol do not know they need to reload. This
pollutes the cache of references and causes StaleSymbol errors down the line.
Replacing with invalidateInheritedSymbols avoids the problem.
|
|\
| |
| | |
Backend: emit annotations
|
| | |
|
| | |
|
|/
|
|
|
| |
When reading external symbols from class Object, need to consider
members of Any as well.
|
|\
| |
| | |
Emit inner classes table.
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Fix #451: support -Ycheck:all.
|
| |/ |
|
|\ \
| |/
|/| |
Populate addresses of symbols, types and trees after pickler
|
| | |
|
| | |
|
| |
| |
| |
| | |
To allow other phases to generate their info.
|
| | |
|
| | |
|
|\ \
| | |
| | | |
use methods to find companion class
|
| | | |
|
| | |
| | |
| | |
| | | |
This reverts commit b653007ed0f30298b44dcc67bf032c1d2d58bcaf.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
As private symbols aren't inherited, this does not break caching.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There's a non-standard interaction between explicitOuter and Pattern matcher,
as patmat can request outer symbols to be available earlier.
Note that this fix makes code between pattern matcher & explicitOuter non-Ycheck-able,
as patmat adds reference to future symbol.
|