aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Flag self names that conflict with parameters or membersMartin Odersky2014-04-084-67/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A self name may no longer have the same name as a parameterless class member (or param accessor). The restriction makes sense because otherwise scoping is confusing. It's needed because otherwise we get TermRefs that have the same name and prefix but denote different things. Moved some code which exercises this from pos/typers to neg/typers
| * | | Reworked TermRef handlingMartin Odersky2014-04-087-27/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main problem with TermRef handling was that signatures were not always tracked correctly. New invariant: A TermRef that points to a symbol is always a TermRefWithSig, and the signature is the one of the corresponding member. We achieve this by sometimes generating a new TermRefWithSig if a TermRef gets a denotation. One possible simplification would be to always store a signature in a TermRef. There's still a problem in TermRefWithSig#newLikeThis, which currently works only if the previously stored denotation references a symbol. We will need to generalize JointRefDenotation to contain multiple symbols for a complete fix.
| * | | Avoid creating a local dummy when retyping.Martin Odersky2014-04-082-4/+9
| | | | | | | | | | | | | | | | Retyping should not create new symbols and that includes local dummys.
| * | | TreeCheckers use re-typing...Martin Odersky2014-04-081-6/+31
| | | | | | | | | | | | | | | | ... to check whether tree types make sense. Still produces errors when enabled.
| * | | Better printing of denotations.Martin Odersky2014-04-082-4/+8
| | | | | | | | | | | | | | | | | | | | Used to print <none> for denotations with a symbol, now prints "some I" where I is the denotation's info.Reworked phases.
| * | | Fleshed out Splitter phaseMartin Odersky2014-04-086-4/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented splitting operations As a side effect, this contains a test ruling out structural term member dispatch. Tests 0586 and 0625 which used structural dispatch got moved to neg.
| * | | Corrected computations of union denotations.Martin Odersky2014-04-082-28/+27
|/ / / | | | | | | | | | | | | | | | Cannot discard a symbol simply because the other side's type is weaker. If in (A | B)#m A and B resolve to different symbols `m`, the resulting denotation cannot have either `m` as symbol; it must be NoSymbol instead.
* | | Merge pull request #116 from dotty-staging/add/Denotation-updateSébastien Doeraene2014-04-052-1/+29
|\ \ \ | | | | | | | | Install method for SymDenotations
| * | | Install method for SymDenotationsMartin Odersky2014-04-042-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | Add a new method to install a SymDenotation after a specific phase has run. The new denotation replaces the current denotation of the symbol starting with the period after the given phase.
* | | | Merge pull request #109 from DarkDimius/erasure-bridgesDmitry Petrashko2014-04-042-6/+102
|\ \ \ \ | |_|/ / |/| | | Bridge generation in erasure implemented.
| * | | Bridge generation in erasure implemented.Dmitry Petrashko2014-04-042-6/+102
| | | | | | | | | | | | | | | | | | | | | | | | Relies on meaning of "override" to see which bridges are required. Doesn't take in account value classes for now Uses 'adapt' used by erasure for converting arguments and return value.
* | | | Merge pull request #110 from DarkDimius/silenceDmitry Petrashko2014-04-044-6/+4
|\ \ \ \ | |_|/ / |/| | | Reduce verbosity of logs.
| * | | Reduce verbosity of logs.Dmitry Petrashko2014-04-024-6/+4
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | We are already over limit on output size imposed by travis that is shown in webpage, if we'll continue to add tests will be soon over limit even to run builds. This commit disables printing of classpath, and removes printlns in several places. In order for ShowClassTests to print info as is was printing previously, please set "test.ShowClassTests.verbose" property.
* | | Merge pull request #99 from samuelgruetter/infostring2odersky2014-04-0415-125/+142
|\ \ \ | | | | | | | | Error reporting improvements
| * | | fix: do not count suppressed messages for summarySamuel Gruetter2014-04-021-1/+1
| | | |
| * | | fix: isSensical in d"..." impl must inspect contents of List argSamuel Gruetter2014-04-021-0/+1
| | | |
| * | | replace some s"..." by i"..."Samuel Gruetter2014-04-023-15/+15
| | | | | | | | | | | | | | | | | | | | Conflicts: src/dotty/tools/dotc/typer/TypeAssigner.scala
| * | | replace i"..." by d"..." if string might go into aSamuel Gruetter2014-04-029-58/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Diagnostic and might be nonsensical Conflicts: src/dotty/tools/dotc/typer/Checking.scala src/dotty/tools/dotc/typer/TypeAssigner.scala
| * | | remove SuppressedMessage exception and update Diagnostic as neededSamuel Gruetter2014-04-022-11/+12
| | | |
| * | | add d string interpolator (marks nonsensical error messages)Samuel Gruetter2014-04-021-0/+28
| | | |
| * | | remove var ContextBase.suppressNonSensicalErrors, andSamuel Gruetter2014-04-022-10/+4
| | | | | | | | | | | | | | | | decouple Diagnostic from ContextBase
| * | | move InfoString from ErrorReporting to Decorators andSamuel Gruetter2014-04-027-44/+36
| | |/ | |/| | | | | | | remove all isSensical/SuppressedMessage logic from InfoString
* | | Merge pull request #112 from dotty-staging/topic/loggable-transformsDmitry Petrashko2014-04-043-2/+18
|\ \ \ | |_|/ |/| | Topic/loggable transforms
| * | test for allOverriddenSymbolsMartin Odersky2014-04-041-0/+13
| | | | | | | | | | | | ... to verify whether they work correctly.
| * | Make transforms loggableMartin Odersky2014-04-042-2/+5
| |/ | | | | | | using traceIndented in the transform method.
* | Merge pull request #105 from DarkDimius/docsDmitry Petrashko2014-04-025-30/+46
|\ \ | | | | | | Documentation and a bit of cleanup.
| * | Documentation and a bit of cleanup.Dmitry Petrashko2014-04-015-30/+46
| |/ | | | | | | | | | | Added documentation for non-trivial logic in Contexts, Phases and TreeTransforms. Removed redundant vars and casts
* | Merge pull request #103 from DarkDimius/transform/erasure-transformsDmitry Petrashko2014-04-026-20/+178
|\ \ | |/ |/| TypeTestCasts fixes and InterceptedMethods transformer
| * Intercepted methods transformerDmitry Petrashko2014-04-026-7/+165
| | | | | | | | | | | | | | Replace member references for: methods inside Any( == and !=) ## on primitives .getClass on primitives
| * Fix TypeTestCastsDmitry Petrashko2014-04-011-13/+13
|/ | | | | | | | | def p() = println().isInstanceOf[Long & Int] was rewritten to val ev$1: [T0]Boolean(x.isInstanceOf) = println().isInstanceOf println().$isInstanceOf[Long & Int].&&(println().$isInstanceOf[Long & Int])
* Merge pull request #106 from DarkDimius/fixes-lazy-vals-typoDmitry Petrashko2014-04-012-2/+2
|\ | | | | Fix build: Fix error in lazy-vals.
| * Fix error in lazy-vals.Dmitry Petrashko2014-03-312-2/+2
|/ | | | Wrong helper method was used.
* Merge pull request #102 from dotty-staging/transform/erasureDmitry Petrashko2014-03-3128-244/+433
|\ | | | | Transform/erasure
| * Factored re-typing logic into seperate ReTyper classMartin Odersky2014-03-313-69/+101
| | | | | | | | | | Refactored re-typing logic from erasure into seperate ReTyper class. Another candidate subclass of ReTyper is a future TreeChecker.
| * Memoizing Context#withPhaseDmitry Petrashko2014-03-311-18/+33
| | | | | | | | | | | | | | withPhase operations in contexts are now memoized. Conflicts: src/dotty/tools/dotc/core/Contexts.scala
| * Renaming clear->setNewMartin Odersky2014-03-315-13/+13
| | | | | | | | | | | | clear is wrong. E.g. clearTyperState does not clear the typerstate at all. It installs a fresh (i.e. cloned) copy of the previous one. clearScope is also wrong; it installs a new scope, does not clear the current one.
| * Added implementation of TypeTestsCasts#boxMartin Odersky2014-03-311-2/+1
| |
| * Maintaining owners during transformationsMartin Odersky2014-03-315-80/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The transformation framework needed to be changed so that contexts passed to transformations have correct owner chains. These owner chins are demanded by the Splitter phase. Note: I eliminated the contexts array in TransformInfo because it interfered with the owner computations. Generally, caching contexts with some phase is best done in Contexts, because withPhase is also used heavily in othre code, not just in Transformers. New phase: Splitter When it is complete, it will make sure that every term Ident and Select node carries a symbol. Right now, all it does is coverting self reference idents to "this"-nodes.
| * More fixes and tests for easure.Martin Odersky2014-03-316-47/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Object_isInstanceOf/asInstanceOf are no longer parameterized methods (seems there's no point in writing x.$asInstanceOf[T]() instead of the shorter x.$asInstanceOf[T]). 2. Array constructor's type is unchanged (the previous rules erased it to def <init>(len: Int)Object which is clearly wrong). 3. indexing needs to be disabled. 4. typedTypeApply needs to keep type applications that apply to type tests and type casts as well as array ops. 5. References to self-ids are typed ThisType(cls) before erasure; are replaced by This(cls) references during erasure.
| * Add -Ycheck capabilityMartin Odersky2014-03-313-6/+45
| | | | | | | | | | Right now uses a super-rudementary tree checker: we only check that every tree has a type.
| * Adapting containsPhase to phase groupsMartin Odersky2014-03-313-6/+9
| | | | | | | | | | A list of names contains a phasegroup if it contains any phase in the group.
| * Avoiding type applications after erasure.Martin Odersky2014-03-312-5/+14
| | | | | | | | | | | | Methods appliedTo and translateParameterizes only apply before erasure (except on arrays). Also, computation of a potential expensive yet redundant lub in assignType(SeqLiteral) is avoided.
| * Added dummy pattern matcherMartin Odersky2014-03-312-1/+28
| | | | | | | | | | at the place forseen for the real pattern matcher, so that following transformations do not have to deal with patterns.
| * Make primitive conversions work also for non-numeric typesMartin Odersky2014-03-313-4/+12
| | | | | | | | | | If the arguments to a primitive conversion are not both numbers, the conversion will either return the argument itself, or throw a ClassCastException.
| * Fix in NamedType#denotMartin Odersky2014-03-311-0/+1
| | | | | | | | Need to update checkedPeriod when new denotation is computed.
| * Fixing completion phaseMartin Odersky2014-03-312-2/+1
| | | | | | | | | | A completer for a lazytype should run in the first phase of the validity period of the denotation that gets completed.
* | Merge pull request #104 from DarkDimius/lazy-vals-objDmitry Petrashko2014-03-312-1/+10
|\ \ | |/ |/| Test that lazy val doesn't rewrite module definitions.
| * Test that lazy val doesn't rewrite module definitions.Dmitry Petrashko2014-03-312-1/+10
|/
* Merge pull request #101 from dotty-staging/transform/erasureDmitry Petrashko2014-03-2928-181/+834
|\ | | | | Transform/erasure
| * Fixes to erasureMartin Odersky2014-03-295-21/+41
| | | | | | | | | | | | | | | | | | | | Various fixes to the tree transformer. In the denotation transformer we now keep self types around because otherwise sourceModule would stop to work. Conflicts: src/dotty/tools/dotc/core/transform/Erasure.scala