aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Removing whitespaces before `[`Dmitry Petrashko2015-04-091-2/+2
|
* Code simplifications stimulated by SimplifyBooleanExpressionChecker.Dmitry Petrashko2015-04-093-3/+6
|
* Replace tabs with 4 spaces in Dotty source.Dmitry Petrashko2015-04-096-25/+25
|
* Make all Dotty source files end in newline.Dmitry Petrashko2015-04-0968-68/+68
|
* Merge pull request #456 from dotty-staging/patmat-eqeqDmitry Petrashko2015-04-095-8/+46
|\ | | | | Fix #453, patternMatcher should use ==
| * Fixed selection in InterceptedMethods that caused a data raceMartin Odersky2015-04-092-5/+42
| | | | | | | | | | Also, added comments to the tpd select methods that explain how the data race could arise and how to avoid it.
| * Rename -YnoDoubleBindings to -Yno-double-bindingsMartin Odersky2015-04-092-2/+2
| | | | | | | | | | | | | | This aligns with the "-" instead of CamelCase convention for the other command line options. Also, enable -Yno-double-bindings for dotc_core.
| * Fix #453, patternMatcher should use ==Dmitry Petrashko2015-04-091-1/+2
| |
* | Drop the invalidate undefined companions code in restoreScopesMartin Odersky2015-04-091-14/+0
|/ | | | | It is no longer needed because companion classes are now tracked with companion$ methods. It also causes unncessary inner classes reads.
* Refactor checking in NamedTypes.Dmitry Petrashko2015-04-081-9/+4
|
* Simplified unpickling of refined types via nextUnsharedTagMartin Odersky2015-04-071-11/+5
|
* Change of TERMREFsymbol/TYPEREFsymbol semanticsMartin Odersky2015-04-074-56/+51
| | | | | | | | | | | | | | | | | | | | | 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.
* Homogenize #Apply projections.Martin Odersky2015-04-072-1/+14
| | | | | | | | 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.
* Fix Deferred flag determination when unpicklingMartin Odersky2015-04-071-2/+14
| | | | | | isAbstractType was wrong because it did not follow through SHARED aliases. This was masked before 1b1fb6e5cf7df42000e378c628c8411bce952eb0 but uncovered afterwards.
* Fixes to double binding check.Martin Odersky2015-04-071-3/+8
| | | | | | | | | | | 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.
* Allow change of symbols in WithFixedSym#newLikeThisMartin Odersky2015-04-071-2/+5
| | | | | | | | | | | | | | | | 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`.
* Move normalizeClassRef to readTemplateMartin Odersky2015-04-071-12/+8
| | | | | | | | | 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.
* Avoid spurious Deferred flag when unpickling classes.Martin Odersky2015-04-071-1/+2
| | | | For classes rhsIsEmpty is true, but they should not be Deferred.
* InSuperCall is always passed explicitly.Martin Odersky2015-04-071-1/+0
| | | | | | There were spurious InSuperCall flag due to the implicit addition of InSuperCall in normalizeFlags. This addition is not necessary, because inSuperCall is serialized.
* Produce expanded names.Martin Odersky2015-04-077-15/+32
| | | | | In the absence of semantic names, this is kludgey. But we need to do it because otherwise the ExpandedName flag is not correctly set.
* Better homogenized types for testing the picklerMartin Odersky2015-04-071-4/+9
| | | | | Will now also re-normalize And/OrTypes because sometimes they were not yet normalized before pickling.
* Test stillValid at initial phase, revive -twiceMartin Odersky2015-04-071-11/+13
| | | | | | | | | | | | | | 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.
* Cleanup of installAfterMartin Odersky2015-04-071-10/+9
| | | | | Same functionality achieved in a simpler way. Also, make sure initial works for stale denotations that refer to some other cycle.
* Cleanup of import list in JavaPlatformMartin Odersky2015-04-071-3/+2
| | | | | | 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.
* Avoid reading symbol's denotation before overwriting them in UnpicklerMartin Odersky2015-04-071-29/+29
| | | | | | 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.
* Use invalidateInheritedSymbols instead of syncWithParentsMartin Odersky2015-04-073-17/+29
| | | | | | | | | | 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.
* Merge pull request #455 from dotty-staging/backend-annotationsDmitry Petrashko2015-04-031-12/+166
|\ | | | | Backend: emit annotations
| * Backend: emit all annotations.Dmitry Petrashko2015-04-031-18/+43
| |
| * Backend: Emmit simple annotationsDmitry Petrashko2015-04-031-12/+141
| |
* | Fixed test failure for core_pickling.Martin Odersky2015-04-031-1/+4
|/ | | | | When reading external symbols from class Object, need to consider members of Any as well.
* Merge pull request #406 from dotty-staging/inner-classesodersky2015-04-032-8/+19
|\ | | | | Emit inner classes table.
| * Handle inner classes defined in suppercalls.Dmitry Petrashko2015-04-022-1/+4
| |
| * Emit inner classes table.Dmitry Petrashko2015-04-021-7/+15
| |
* | Merge pull request #457 from dotty-staging/ycheckallodersky2015-04-031-1/+2
|\ \ | | | | | | Fix #451: support -Ycheck:all.
| * | Fix #451: support -Ycheck:all.Dmitry Petrashko2015-04-031-1/+2
| |/
* | Merge pull request #416 from dotty-staging/pickler-modularDmitry Petrashko2015-04-034-11/+43
|\ \ | |/ |/| Populate addresses of symbols, types and trees after pickler
| * Address reviewer comments on #416Dmitry Petrashko2015-04-033-11/+22
| |
| * Review of #394Dmitry Petrashko2015-03-182-2/+2
| |
| * Populate addresses of symbols after picklerDmitry Petrashko2015-03-183-1/+10
| | | | | | | | To allow other phases to generate their info.
| * Update address maps of symbols after compactionDmitry Petrashko2015-03-181-1/+9
| |
| * Export pickler and pickled addresses so that other phases can pickle their infoDmitry Petrashko2015-03-182-6/+10
| |
* | Merge pull request #436 from dotty-staging/linked-classDmitry Petrashko2015-04-0214-36/+157
|\ \ | | | | | | use methods to find companion class
| * | Simplify methods implemented in #436Dmitry Petrashko2015-04-023-18/+15
| | |
| * | Revert "Workaround #440 in FirstTransform."Dmitry Petrashko2015-04-021-2/+2
| | | | | | | | | | | | This reverts commit b653007ed0f30298b44dcc67bf032c1d2d58bcaf.
| * | Both module and class being unpickled need to register links.Dmitry Petrashko2015-03-301-4/+10
| | |
| * | Fix #443, set moduleClass of class being lazily unpickled.Dmitry Petrashko2015-03-301-1/+5
| | |
| * | Allow to enter private symbols into Frozen scopes.Dmitry Petrashko2015-03-301-1/+1
| | | | | | | | | | | | As private symbols aren't inherited, this does not break caching.
| * | companionModule needs to return ModuleVal for Module.Dmitry Petrashko2015-03-301-6/+8
| | |
| * | Do not synthesizeCompanionMethod twice, and do not rewrite the existing symbol.Dmitry Petrashko2015-03-301-5/+11
| | |
| * | Fix #442.Dmitry Petrashko2015-03-301-2/+6
| | | | | | | | | | | | | | | | | | | | | 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.