summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala
Commit message (Collapse)AuthorAgeFilesLines
* Error message for super calls to indirect java parent interfacesLukas Rytz2016-09-301-2/+2
| | | | | | | | Super calls to indirect java parent interfaces cannot be emitted, an error message is emitted during SuperAccessors. The error message was missing if the super call was non-qualified, resulting in an assertion failure in the backend.
* SD-143 allow super calls to methods defined in indirect super classesJason Zaugg2016-09-051-1/+7
| | | | | | | | The restriction for super calls to methods defined in indirect super classes introduced in a980fde was over-restrictive. In particular, it ruled out a valid code pattern to select a method from a superclass when an unqualified `super` would resolve to an override defined in a trait (example in the commit as a test).
* SD-143 error for super calls that cannot be implemented correctlyLukas Rytz2016-09-011-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | If a call super[T].m resolves to a method A.m where A is a class, but not the direct superclass of the current class, there is no way to emit an invocation of A.m: `invokespecial A.m` will resolve to B.m where B is the superclass of the current class. This commit adds an error message in this case. Note that this is similar to an existing error message for qualified super calls to a non-direct superclass: class A { def m = 1 } class B extends A { override def m = 2 } class C extends B { override def m = super[A].m } Gives "error: A does not name a parent class of class C". If the user means to call method m in the superclass, he can write an unqualified `super.m`. An similar error message is introduced if A is a Java-defined interface (and m is a default method), and A is not a direct parent of the current class. In this case `invokespecial A.m` is invalid bytecode. The solution is to add A as a direct parent of the current class.
* LambdaLift emits paramaccessor syms and defdefsAdriaan Moors2016-08-111-5/+6
| | | | | | | | | | | ... instead of emitting ValDefs and field symbols, which are then promptly unlinked and transformed by the "late trait methods" logic in mixins... Mixins still synthesizes implementations for these accessors in subclasses. A paramaccessor in a trait is a method without an underlying field.
* Merge pull request #4729 from retronym/topic-trait-defaults-moduleLukas Rytz2015-12-181-1/+1
|\ | | | | Desugar module var and accessor in refchecks/lazyvals
| * Desugar module var and accessor in refchecks/lazyvalsJason Zaugg2015-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than leaving it until mixin. The broader motivation is to simplify the mixin phase of the compiler before we get rid of implementatation classes in favour of using JDK8 default interface methods. The current code in mixin is used for both lazy val and modules, and puts the "slow path" code that uses the monitor into a dedicated method (`moduleName$lzyCompute`). I tracked this back to a3d4d17b77. I can't tell from that commit whether the performance sensititivity was related to modules or lazy vals, from the commit message I'd say the latter. As the initialization code for a module is just a constructor call, rather than an arbitraryly large chunk of code for a lazy initializer, this commit opts to inline the `lzycompute` method. During refchecks, mixin module accessors are added to classes, so that mixed in and defined modules are translated uniformly. Trait owned modules get an accessor method with an empty body (that shares the module symbol), but no module var. Defer synthesis of the double checked locking idiom to the lazyvals phase, which gets us a step closer to a unified translation of modules and lazy vals. I had to change the `atOwner` methods to to avoid using the non-existent module class of a module accessor method as the current owner. This fixes a latent bug. Without this change, retypechecking of the module accessor method during erasure crashes with an accessibility error selecting the module var. In the process, I've tweaked a tree generation utility method to wvoid synthesizing redundant blocks in module desugaring.
* | Cleanups, debuglogs, small refactoringsAdriaan Moors2015-11-111-1/+1
|/
* Error message improvementesfandiar amirrahimi2015-04-081-1/+1
| | | | 'may be not be' -> 'may not be'
* SI-8803 generate super accessor for super[A], if A is outer superclassLukas Rytz2014-08-201-4/+16
| | | | | | | | | | | | | | | | | | | | | class C extends A with T { class I { C.super[T] C.super[A] } } A super call in a nested class of the form super[T] where T is a parent trait of the outer class doesn't need an accessor: mixin can directly re-route the call to the correct implementation class - it's statically known to be T$class. However, if a nested class accesses super[A] and A is the superclass of the outer class (not a trait), then we need a super accessor in the outer class. We need to add the mixin name to the super accessor name, otherwise it clashes with non-qualified super accessors.
* SI-8525 No anonymous lintSom Snytt2014-07-101-1/+1
| | | | | | | | | Turn anonymous references to `settings.lint` into named settings. After that, trust to Adriaan to make them filterable. There are a few remaining top-level -Y lint warnings that are deprecated.
* Rip out reporting indirection from CompilationUnitAdriaan Moors2014-07-041-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inline the forwarders from CompilationUnit, which should not affect behavior. Since all forwarders lead to global.reporter, don't first navigate to a compilation unit, only to then forward back to global.reporter. The cleanup in the previous commits revealed a ton of confusion regarding how to report an error. This was a mechanical search/replace, which has low potential for messing things up, since the list of available methods are disjoint between `reporter` and `currentRun.reporting`. The changes involving `typer.context` were done previously. Essentially, there are three ways to report: - via typer.context, so that reporting can be silenced (buffered) - via global.currentRun.reporting, which summarizes (e.g., deprecation) - via global.reporter, which is (mostly) stateless and straightforward. Ideally, these should all just go through `global.currentRun.reporting`, with the typing context changing that reporter to buffer where necessary. After the refactor, these are the ways in which we report (outside of typer): - reporter.comment - reporter.echo - reporter.error - reporter.warning - currentRun.reporting.deprecationWarning - currentRun.reporting.incompleteHandled - currentRun.reporting.incompleteInputError - currentRun.reporting.inlinerWarning - currentRun.reporting.uncheckedWarning Before: - c.cunit.error - c.enclosingUnit.deprecationWarning - context.unit.error - context.unit.warning - csymCompUnit.warning - cunit.error - cunit.warning - currentClass.cunit.warning - currentIClazz.cunit.inlinerWarning - currentRun.currentUnit.error - currentRun.reporting - currentUnit.deprecationWarning - currentUnit.error - currentUnit.warning - getContext.unit.warning - getCurrentCUnit.error - global.currentUnit.uncheckedWarning - global.currentUnit.warning - global.reporter - icls.cunit.warning - item.cunit.warning - reporter.comment - reporter.echo - reporter.error - reporter.warning - reporting.deprecationWarning - reporting.incompleteHandled - reporting.incompleteInputError - reporting.inlinerWarning - reporting.uncheckedWarning - typer.context.unit.warning - unit.deprecationWarning - unit.echo - unit.error - unit.incompleteHandled - unit.incompleteInputError - unit.uncheckedWarning - unit.warning - v1.cunit.warning All these methods ended up calling a method on `global.reporter` or on `global.currentRun.reporting` (their interfaces are disjoint). Also clean up `TypeDiagnostics`: inline nearly-single-use private methods.
* Document SuperAccessorsMartin Odersky2014-07-031-10/+36
| | | | | Added comment giving an up-to-date overview of SuperAccessors and how we might want to change it.
* SI-7992 Fix super-accessor generation after a local classJason Zaugg2014-03-151-0/+2
| | | | | | | | | | | | | | | The transformer in the superaccessors phase uses the var `validCurrentOwner` to track whether we're in a part of the code that won't end up in the host method, and as such, will need to access super-method via a super-accessor. But, this bit of bookkeeping was not correctly reset after traversing out of a local class. A `VerifyError` ensued. This commit changes `atOwner` to save and restore that flag, rather than leaving it set to `true`. I've also added a test variation using a by-name argument.
* SI-6732 deprecates internal#Symbol.isPackageEugene Burmako2014-02-141-1/+1
| | | | | | | | This is the first step in disentangling api#Symbol.isPackage, which is supposed to return false for package classes, and internal#Symbol.isPackage, which has traditionally being used as a synonym for hasPackageFlag and hence returned true for package classes (unlike isModule which is false for module classes).
* disambiguates uses of “local” in internal symbol APIEugene Burmako2014-02-121-1/+1
| | | | | | | | | | | | | | | | | There’s been a conflation of two distinct meanings of the word “local” in the internal symbol API: the first meaning being “local to this” (as in has the LOCAL flag set), the second meaning being “local to block” (as in declared in a block, i.e. having owner being a term symbol). Especially confusing is the fact that sym.isLocal isn’t the same as sym.hasFlag(LOCAL), which has led to now fixed SI-6733. This commit fixes the semantic mess by deprecating both Symbol.isLocal and Symbol.hasLocalFlag (that we were forced to use, because Symbol.isLocal had already been taken), and replacing them with Symbol.isLocalToThis and Symbol.isLocalToBlock. Unfortunately, we can’t remove the deprecated methods right away, because they are used in SBT, so I had to take small steps.
* SI-8151 Remove -Yself-in-annots and associated implementationJason Zaugg2014-01-151-1/+1
| | | | | | | | | | | | | | | This experimental option typechecked arguments of annotations with an injected value in scope named `self`: @Foo(self.foo < 1) This has been slated for removal [1] for some time. This commit removes it in one fell swoop, without any attempt at source compatibility with code that constructs or pattern matches on AnnotatedType. [1] https://groups.google.com/d/msg/scala-internals/VdZ5UJwQFGI/C6tZ493Yxx4J
* Reducing variation of tree creation methods.Paul Phillips2013-09-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | TreeDSL has no future - it was always a temporary measure waiting for something like quasiquotes to come along. In this commit I cull as much of it as I can, especially the delicate matter of creating new DefDefs and ValDefs, which I completely turn over to the old style creators. I unified all the symbol-based DefDef and ValDef creators under a single method, since it was yet another place where ctrl-C and ctrl-V were being punched with glee. Was beaten to the punch on adding copyTypeDef to fill out the *Def creators. Eliminated as many redundant positioning calls as I could find. If you are creating a DefTree tree based on a symbol, it will always have an atPos(sym.pos) { ... } wrapped around it. You don't need another one. All of this is motivated by positions work: positions are assigned in so many places and in such an ad hoc fashion that it is impossible to bring consistency to that without first bringing some consistency to tree creation.
* No longer crash on NoSymbol.owner.Paul Phillips2013-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically calling NoSymbol.owner has crashed the compiler. With this commit, NoSymbol owns itself. This is consistent with the way ownership chains are handled elsewhere in the compiler (e.g. NoContext.owner is NoContext, NoSymbol.enclClass is NoSymbol, and so on) and frees every call site which handles symbols from having to perform precondition tests against NoSymbol. Since calling NoSymbol.owner sometimes (not always) indicates a bug which we'd like to catch sooner than later, I have introduced a couple more methods for selected call sites. def owner: Symbol // NoSymbol.owner is self, log if -Xdev def safeOwner: Symbol // NoSymbol.owner is self, ignore def assertOwner: Symbol // NoSymbol.owner is fatal The idea is that everyone can call sym.owner without undue anxiety or paranoid null-like tests. When compiling under -Xdev calls to `owner` are logged with a stack trace, so any call sites for which that is an expected occurrence should call safeOwner instead to communicate the intention and stay out of the log. Conversely, any call site where crashing on the owner call was a desirable behavior can opt into calling assertOwner. This commit also includes all the safeOwner calls necessary to give us a silent log when compiling scala.
* Concision contribution.Paul Phillips2013-05-231-2/+2
| | | | | | | | | | | | | | | | | | | | | We have lots of core classes for which we need not go through the symbol to get the type: ObjectClass.tpe -> ObjectTpe AnyClass.tpe -> AnyTpe I updated everything to use the concise/direct version, and eliminated a bunch of noise where places were calling typeConstructor, erasedTypeRef, and other different-seeming methods only to always wind up with the same type they would have received from sym.tpe. There's only one Object type, before or after erasure, with or without type arguments. Calls to typeConstructor were especially damaging because (see previous commit) it had a tendency to cache a different type than the type one would find via other means. The two types would compare =:=, but possibly not == and definitely not eq. (I still don't understand what == is expected to do with types.)
* Merge v2.10.1-326-g4f8c306' into merge/v2.10.1-326-g4f8c306-to-masterJason Zaugg2013-05-171-40/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ================================================================ Merge commit 'v2.10.1-326-g4f8c306' into merge/v2.10.1-326-g4f8c306-to-master Conflicts: src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala src/reflect/scala/reflect/runtime/JavaMirrors.scala ================================================================ Merge -s ours 4e64a27 ([nomaster commit range]) ================================================================ Merge commit '0ae7e55' into merge/v2.10.1-326-g4f8c306-to-master Conflicts: src/compiler/scala/tools/nsc/typechecker/Macros.scala
| * Absolutized paths involving the scala package.Paul Phillips2013-05-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Confusing, now-it-happens now-it-doesn't mysteries lurk in the darkness. When scala packages are declared like this: package scala.collection.mutable Then paths relative to scala can easily be broken via the unlucky presence of an empty (or nonempty) directory. Example: // a.scala package scala.foo class Bar { new util.Random } % scalac ./a.scala % mkdir util % scalac ./a.scala ./a.scala:4: error: type Random is not a member of package util new util.Random ^ one error found There are two ways to play defense against this: - don't use relative paths; okay sometimes, less so others - don't "opt out" of the scala package This commit mostly pursues the latter, with occasional doses of the former. I created a scratch directory containing these empty directories: actors annotation ant api asm beans cmd collection compat concurrent control convert docutil dtd duration event factory forkjoin generic hashing immutable impl include internal io logging macros man1 matching math meta model mutable nsc parallel parsing partest persistent process pull ref reflect reify remote runtime scalap scheduler script swing sys text threadpool tools transform unchecked util xml I stopped when I could compile the main src directories even with all those empties on my classpath.
| * Documented lateMETHOD flag.Paul Phillips2013-04-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | A baby step toward its eventual elimination. WANTED, DEAD OR ALIVE For Heinous Crimes Against Efficiency and Scrutability lateDEFERRED lateFINAL lateINTERFACE lateMODULE notPROTECTED notPRIVATE notOVERRIDE lateMETHOD ON THE RUN lateMETHOD
| * Merge remote-tracking branch 'origin/2.10.x' into merge-2.10.xPaul Phillips2013-04-081-2/+9
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/2.10.x: if starr.use.released fetch Scala ${starr.version} for STARR assume build.release when maven.version.suffix is set make quick.done depend on quick.bin again SI-7321 Memory leak in specialize on multiple compiler runs. Take the N^2 out of the compiler's TreeSet. SI-6900 Fix tailrec for dependent method types Simplify interplay between Uncurry Info- and Tree-Transformers Refactor existential related code out of types. Add a cautionary comment to TreeSymSubstitutor. SI-6715 Shouldn't return "" from TermNames.originalName Backport #2289's TermNames.unexpandedName as TermNames.originalName SI-7147 Diagnostic for unexplained assertion in presentation compiler. SI-6793 Don't use super param accessors if inaccessible. Correct sorting example for Ordering in scaladoc Conflicts: bincompat-backward.whitelist.conf bincompat-forward.whitelist.conf build.xml src/compiler/scala/tools/nsc/transform/UnCurry.scala src/reflect/scala/reflect/internal/StdNames.scala
| * | SI-7261 Implicit conversion of BooleanSetting to Boolean and BooleanFlagSom Snytt2013-03-271-3/+3
| | | | | | | | | | | | | | | | | | | | | This commit shortens expressions of the form `if (settings.debug.value)` to `if (settings.debug)` for various settings. Rarely, the setting is supplied as a method argument. The conversion is not employed in simple definitions where the Boolean type would have to be specified.
| * | Overhauled local/getter/setter name logic.Paul Phillips2013-03-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sifted through extraneous methods trying to find consistency, consolidating and deprecating as I went. The original motivation for all this was the restoration of LOCAL_SUFFIX to originalName, because: It looks like in an attempt to make originalName print consistently with decodedName, I went a little too far and stripped invisible trailing spaces from originalName. This meant outer fields would have an originalName of '$outer' instead of '$outer ', which in turn could have caused them to be mis-recognized as outer accessors, because the logic of outerSource hinges upon "originalName == nme.OUTER". I don't know if this affected anything - I noticed it by inspection, improbably enough. Deprecated originalName - original, compared to what? - in favor of unexpandedName, which has a more obvious complement. Introduced string_== for the many spots where people have given up and are comparing string representations of names. A light dusting of types is still better than nothing. Editoral note: LOCAL_SUFFIX is the worst. Significant trailing whitespace! It's a time bomb.
| * | Doc -> C-style comments for local symbols to avoid "discardingEugene Vigdorchik2013-03-211-1/+2
| | | | | | | | | | | | | | | unmoored doc comment" warning when building distribution for scala itself.
| * | Moved scaladoc code into src/scaladoc.Paul Phillips2013-03-091-12/+0
| | | | | | | | | | | | | | | | | | This leverages the preceding several commits to push scaladoc specific code into src/scaladoc. It also renders some scanner code more comprehensible.
| * | Name boolean arguments in src/compiler.Jason Zaugg2013-03-051-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What would you prefer? adaptToMemberWithArgs(tree, qual, name, mode, false, false) Or: adaptToMemberWithArgs(tree, qual, name, mode, reportAmbiguous = false, saveErrors = false)
| * | Banish needless semicolons.Jason Zaugg2013-02-241-4/+4
| | |
| * | Merge 2.10.x into master.Adriaan Moors2013-02-201-1/+5
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: build.number src/compiler/scala/tools/nsc/doc/base/MemberLookupBase.scala src/compiler/scala/tools/nsc/typechecker/Macros.scala test/files/presentation/doc/doc.scala
| * \ \ Merge branch 'merge-2.10-wip' into merge-2.10Paul Phillips2012-12-051-2/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * merge-2.10-wip: Fixing OSGi distribution. Fix for rangepos crasher. SI-6685 fixes error handling in typedApply Test cases for SI-5726, SI-5733, SI-6320, SI-6551, SI-6722. Asserts about Tree qualifiers. Fix for SI-6731, dropped trees in selectDynamic. neg test added SI-5753 macros cannot be loaded when inherited from a class or a trait Take advantage of the margin stripping interpolator. Adds a margin stripping string interpolator. SI-6718 fixes a volatile test Mark pattern matcher synthetics as SYNTHETIC. Set symbol flags at creation. Fix for SI-6687, wrong isVar logic. Fix for SI-6706, Symbol breakage under GC. findEntry implementation code more concise and DRYer. Fix for SI-6357, cycle with value classes. Refactoring of adaptMethod SI-6677 Insert required cast in `new qual.foo.T` Conflicts: src/compiler/scala/tools/nsc/transform/Erasure.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/reflect/scala/reflect/internal/SymbolTable.scala src/reflect/scala/reflect/internal/util/package.scala test/files/neg/gadts1.check
| * \ \ \ Merge commit 'refs/pull/1574/head' into merge-210Paul Phillips2012-11-051-8/+6
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'refs/pull/1574/head': (24 commits) Fixing issue where OSGi bundles weren't getting used for distribution. Fixes example in Type.asSeenFrom Fix for SI-6600, regression with ScalaNumber. SI-6562 Fix crash with class nested in @inline method Brings copyrights in Scaladoc footer and manpage up-to-date, from 2011/12 to 2013 Brings all copyrights (in comments) up-to-date, from 2011/12 to 2013 SI-6606 Drops new icons in, replaces abstract types placeholder icons SI-6132 Revisited, cleaned-up, links fixed, spelling errors fixed, rewordings Labeling scala.reflect and scala.reflect.macros experimental in the API docs Typo-fix in scala.concurrent.Future, thanks to @pavelpavlov Remove implementation details from Position (they are still under reflection.internal). It probably needs more cleanup of the api wrt to ranges etc but let's leave it for later SI-6399 Adds API docs for Any and AnyVal Removing actors-migration from main repository so it can live on elsewhere. Fix for SI-6597, implicit case class crasher. SI-6578 Harden against synthetics being added more than once. SI-6556 no assert for surprising ctor result type Removing actors-migration from main repository so it can live on elsewhere. Fixes SI-6500 by making erasure more regular. Modification to SI-6534 patch. Fixes SI-6559 - StringContext not using passed in escape function. ... Conflicts: src/actors-migration/scala/actors/migration/StashingActor.scala src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala src/compiler/scala/tools/nsc/settings/AestheticSettings.scala src/compiler/scala/tools/nsc/transform/Erasure.scala src/library/scala/Application.scala src/library/scala/collection/immutable/GenIterable.scala.disabled src/library/scala/collection/immutable/GenMap.scala.disabled src/library/scala/collection/immutable/GenSeq.scala.disabled src/library/scala/collection/immutable/GenSet.scala.disabled src/library/scala/collection/immutable/GenTraversable.scala.disabled src/library/scala/collection/mutable/GenIterable.scala.disabled src/library/scala/collection/mutable/GenMap.scala.disabled src/library/scala/collection/mutable/GenSeq.scala.disabled src/library/scala/collection/mutable/GenSet.scala.disabled src/library/scala/collection/mutable/GenTraversable.scala.disabled src/library/scala/collection/parallel/immutable/ParNumericRange.scala.disabled
| * | | | | Removing unused locals and making vars into vals.Paul Phillips2012-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to "git diff" the difference from master to this commit includes: Minus: 112 vals, 135 vars Plus: 165 vals, 2 vars Assuming all the removed ones were vals, which is true from 10K feet, it suggests I removed 80 unused vals and turned 133 vars into vals. There are a few other -Xlint driven improvements bundled with this, like putting double-parentheses around Some((x, y)) so it doesn't trigger the "adapting argument list" warning.
| * | | | | Remove unused private members.Paul Phillips2012-11-011-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That's a lot of unused code. Most of this is pure cruft; a small amount is debugging code which somebody might want to keep around, but we should not be using trunk as a repository of our personal snippets of undocumented, unused, unintegrated debugging code. So let's make the easy decision to err in the removing direction. If it isn't built to last, it shouldn't be checked into master.
| * | | | | Merge branch '2.10.x' into masterPaul Phillips2012-09-191-5/+15
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.10.x: (51 commits) improved/fixed reflection docs based on comments Fixes SI-6354: improved error messages for Dynamic signature mismatches. Add RedBlackTree tests for take/drop/slice. Retain Ordering in drop/take/slice signatures. test case closes SI-5770 clarify caveats of App trait Remove `@static` annotation from the library. New starr that does not depend on `@static`. improved reflection documentation pull request feedback SI-5692 better error message SI-5942 toolboxes now reset front ends SI-6287 fixes synthetic symbol clashes in toolbox Revert "Implement @static annotation on singleton object fields." Revert "WIP add private/lazy checks and a few tests." Revert "Fixes SI-6189." Revert "Fixes SI-6236." Revert "Fix SI-4581." Revert "Fix SI-6294." refactors java reflection tests ... Conflicts: src/compiler/scala/tools/nsc/typechecker/Typers.scala src/partest/scala/tools/partest/package.scala src/reflect/scala/reflect/internal/Trees.scala
| * \ \ \ \ \ Merge branch '2.10.x'amin2012-08-211-2/+27
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Review by @paulp or @gkossakowski. Conflicts: src/compiler/scala/tools/nsc/ast/parser/Scanners.scala src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala src/compiler/scala/tools/nsc/transform/UnCurry.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/reflect/scala/reflect/internal/Types.scala
| * \ \ \ \ \ \ Merge remote-tracking branch 'origin/2.10.x' into merge-210Paul Phillips2012-08-171-2/+2
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Eugene Burmako (12) and others # Via Paul Phillips (4) and others * origin/2.10.x: Fixes SI-6236. Fixes SI-6189. Hunting down eliminable :: allocations. Absolutize tools.nsc => scala.tools.nsc. more cleanup for typedMacroBody shaves more than 150 lines off typedMacroBody Optimization in SubstMap. removes dead code pull request feedback more macro cleanup further cleanup of transformTypeTagEvidenceParams macroImplSigs => macroImplSig Dominik's comments on api.Mirrors phaseId(currentPeriod) >= erasurePhase.id materializeImplicit and implicitsOfExpectedType cleanup of reflection- and macro-related stuff adds the `skipPackage` attribute to Scaladoc Fixes backend crash due to incorrect consumedTypes Fix SI-6208. mutable.Queue now returns mutable.Queue for collection methods rather than MutableList.
| * \ \ \ \ \ \ \ Merge remote-tracking branch 'upstream/2.10.x' into merge-210Lukas Rytz2012-08-161-3/+3
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Required a few changes of `HIDDEN` -> `ARTIFACT` and `isHidden` -> `isArtifact` Conflicts: src/reflect/scala/reflect/internal/Flags.scala
| * | | | | | | | | Merge branch '2.10.x'Adriaan Moors2012-08-141-63/+80
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/Global.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala test/files/neg/t6048.check
| * | | | | | | | | Merge branch '2.10.x'Adriaan Moors2012-08-081-1/+1
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/ast/TreeGen.scala src/compiler/scala/tools/nsc/settings/AestheticSettings.scala
| * | | | | | | | | | Expanded use of HIDDEN flag.Paul Phillips2012-07-191-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like the comment says: /** Symbols which are marked HIDDEN. (Expand this list?) * * - $outer fields and accessors * - super accessors * - protected accessors * - lazy local accessors * - bridge methods * - default argument getters * - evaluation-order preserving locals for right-associative and out-of-order named arguments * - catch-expression storing vals * - anything else which feels a setFlag(HIDDEN) */ I also changed a few safe-appearing locations to check isHidden rather than isSynthetic. Review by @dragos, @odersky.
* | | | | | | | | | | SI-5886 Remove check for packed type conformance.Jason Zaugg2013-05-151-22/+1
| |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nothing breaks. Why did by-name arguments have this extra check? What's the difference to a () => T? The check was added originally in 8414eba.
* | | | | | | | | | SI-6793 Don't use super param accessors if inaccessible.Jason Zaugg2013-03-261-2/+9
| |_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Alias replacement" has been with us since 2005 (13c59adf9). Given: package a { class C1(val v0: String) class C2(v1: String) extends a.C1(v1) { v1 } } The reference to `v1` is rewritten as `C2.super.v0()`, and no field is generated in `C2`. (Oddly, this optimization doesn't seem to kick in if these classes are in the empty package. That's probably a distinct bug.) However, this rewriting is done without consideration of the accessibility of `v0` from `C2`. This commit disables this optimization if there if `v0` is not accessible.
* | | | | | | | | SI-7091 Don't try to put a protected accessor in a package.Jason Zaugg2013-02-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This shows up when a protected[pack] class has a constructor with a default argument. Regressed in f708b87 / SI-2296.
* | | | | | | | | SI-7091 Add a diagnostic for the "no acc def buf" error.Jason Zaugg2013-02-101-1/+4
| |_|_|_|_|_|_|/ |/| | | | | | |
* | | | | | | | Take advantage of the margin stripping interpolator.Jason Zaugg2012-11-261-2/+2
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | Safer and shorter.
* | | | | | | Merge pull request #1559 from heathermiller/copyright-updateJosh Suereth2012-11-041-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Updated copyright dates throughout compiler and stdlib for upcoming release
| * | | | | | | Brings all copyrights (in comments) up-to-date, from 2011/12 to 2013Heather Miller2012-11-021-1/+1
| | |_|_|_|_|/ | |/| | | | |
* / | | | | | SI-6562 Fix crash with class nested in @inline methodJason Zaugg2012-11-021-7/+5
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e6b4204604 moved access widenings from ExplicitOuter to SuperAccessors to reflect them in pickled signatures so that the inliner can take advantage of them under separate compilation. The followup discussion [1] determined that this wasn't the right solution: while it enabled new separate compilation inlinings, it failed to widen access of outer pointers and hence prevented certain inlinings. A better solution was proposed: modify the inliner to know that access widening is guaranteed to have happened in ExplicitOuter for any field accessed by an @inline-d method body, rather than relying solely on the pickled types. But this hasn't happened yet. In the meantime 07f94297 / #1121 reinstated the access widening to SuperAccessors, but took a slightly different approach, using `Symbol#enclMethod` rather than `closestEnclMethod`. That deviation triggers SI-6562. This commit goes back to `closestEnclMethod`. [1] https://groups.google.com/forum/#!topic/scala-internals/iPkMCygzws4
* | | | | / Fix for SI-6245 with workaround for SI-2296.amin2012-09-131-4/+13
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | protected/super accessor issue: Don't subvert the creation of the standard protected accessor with the java interop accessor. For SI-2296, the compiler emits an error instead of causing an illegal access error at runtime.