summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/transform/TypingTransformers.scala
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Restrict `contextMode` fiddling to `Context`Adriaan Moors2014-07-171-3/+3
| | | | Introduce `initRootContext` to set the relevant bits.
* Name boolean arguments in src/compiler.Jason Zaugg2013-03-051-1/+1
| | | | | | | | | | What would you prefer? adaptToMemberWithArgs(tree, qual, name, mode, false, false) Or: adaptToMemberWithArgs(tree, qual, name, mode, reportAmbiguous = false, saveErrors = false)
* Remove code from compiler central.Paul Phillips2012-11-201-2/+0
| | | | | All those old-timey methods whose melodies have become unfashionable.
* Revert "Commenting out unused members."Paul Phillips2012-11-191-1/+1
| | | | This reverts commit 951fc3a486.
* Commenting out unused members.Paul Phillips2012-11-191-1/+1
| | | | | | | | | | | | | | | | | | I want to get this commit into the history because the tests pass here, which demonstrates that every commented out method is not only unnecessary internally but has zero test coverage. Since I know (based on the occasional source code comment, or more often based on knowing something about other source bases) that some of these can't be removed without breaking other things, I want to at least record a snapshot of the identities of all these unused and untested methods. This commit will be reverted; then there will be another commit which removes the subset of these methods which I believe to be removable. The remainder are in great need of tests which exercise the interfaces upon which other repositories depend.
* Removed unused imports.Paul Phillips2012-11-061-2/+0
| | | | | | | | | A dizzying number of unused imports, limited to files in src/compiler. I especially like that the unused import option (not quite ready for checkin itself) finds places where feature implicits have been imported which are no longer necessary, e.g. this commit includes half a dozen removals of "import scala.language.implicitConversions".
* Brings all copyrights (in comments) up-to-date, from 2011/12 to 2013Heather Miller2012-11-021-1/+1
|
* Optimization to atOwnerMartin Odersky2012-08-201-6/+1
| | | | Moved costly hashMap updates into SuperAccessors from general tree transformers and replaced by immutable map.
* update and normalize copyright noticeAdriaan Moors2012-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are the regexp replacements performed: Sxcala -> Scala Copyright (\d*) LAMP/EPFL -> Copyright $1-2012 LAMP/EPFL Copyright (\d*)-(\d*)(,?) LAMP/EPFL -> Copyright $1-2012 LAMP/EPFL Copyright (\d*)-(\d*) Scala Solutions and LAMP/EPFL -> Copyright $1-2012 Scala Solutions and LAMP/EPFL \(C\) (\d*)-(\d*) LAMP/EPFL -> (C) $1-2012 LAMP/EPFL Copyright \(c\) (\d*)-(\d*)(.*?)EPFL -> Copyright (c) $1-2012$3EPFL The last one was needed for two HTML-ified copyright notices. Here's the summarized diff: Created using ``` git diff -w | grep ^- | sort | uniq | mate git diff -w | grep ^+ | sort | uniq | mate ``` ``` - <div id="footer">Scala programming documentation. Copyright (c) 2003-2011 <a href="http://www.epfl.ch" target="_top">EPFL</a>, with contributions from <a href="http://typesafe.com" target="_top">Typesafe</a>.</div> - copyright.string=Copyright 2002-2011, LAMP/EPFL - <meta name="Copyright" content="(C) 2002-2011 LAMP/EPFL"/> - * Copyright 2002-2011 LAMP/EPFL - * Copyright 2004-2011 LAMP/EPFL - * Copyright 2005 LAMP/EPFL - * Copyright 2005-2011 LAMP/EPFL - * Copyright 2006-2011 LAMP/EPFL - * Copyright 2007 LAMP/EPFL - * Copyright 2007-2011 LAMP/EPFL - * Copyright 2009-2011 Scala Solutions and LAMP/EPFL - * Copyright 2009-2011 Scxala Solutions and LAMP/EPFL - * Copyright 2010-2011 LAMP/EPFL - * Copyright 2012 LAMP/EPFL -# Copyright 2002-2011, LAMP/EPFL -* Copyright 2005-2011 LAMP/EPFL -/* NSC -- new Scala compiler -- Copyright 2007-2011 LAMP/EPFL */ -rem # Copyright 2002-2011, LAMP/EPFL ``` ``` + <div id="footer">Scala programming documentation. Copyright (c) 2003-2012 <a href="http://www.epfl.ch" target="_top">EPFL</a>, with contributions from <a href="http://typesafe.com" target="_top">Typesafe</a>.</div> + copyright.string=Copyright 2002-2012 LAMP/EPFL + <meta name="Copyright" content="(C) 2002-2012 LAMP/EPFL"/> + * Copyright 2002-2012 LAMP/EPFL + * Copyright 2004-2012 LAMP/EPFL + * Copyright 2005-2012 LAMP/EPFL + * Copyright 2006-2012 LAMP/EPFL + * Copyright 2007-2012 LAMP/EPFL + * Copyright 2009-2012 Scala Solutions and LAMP/EPFL + * Copyright 2010-2012 LAMP/EPFL + * Copyright 2011-2012 LAMP/EPFL +# Copyright 2002-2012 LAMP/EPFL +* Copyright 2005-2012 LAMP/EPFL +/* NSC -- new Scala compiler -- Copyright 2007-2012 LAMP/EPFL */ +rem # Copyright 2002-2012 LAMP/EPFL ```
* Updated copyright notices to 2011Antonio Cunei2011-01-201-1/+1
|
* Some cleanups in the compiler source.Paul Phillips2010-10-111-2/+2
| | | | | | | eliminated the import of ambiguously named classes from e.g. collection.mutable, obeyed a todo in the parser regarding dropping lbracket from statement starting tokens. No review.
* closes #3582: typedTypeDef needs to run in a ne...Adriaan Moors2010-08-091-1/+1
| | | | | | | | | | | | | | | | | closes #3582: typedTypeDef needs to run in a new typer for TypeDefs with type parameters this was honored when typedTypeDef was called by typed1, but other callers did not this would cause higher-order type parameters to be re-entered in the scope of a method or a class (by the way, should we recycle scopes for higher-order type params? now new scopes are created, symbols entered, and tree's symbols updated) changed some spurious vars to vals review by odersky
* Make local lazy values thread-safe.Iulian Dragos2010-06-091-2/+5
| | | | | | is now guaranteed to be initialized at most once, even when accessed from different threads. Closes #3007, review by odersky.
* Removed more than 3400 svn '$Id' keywords and r...Antonio Cunei2010-05-121-1/+0
| | | | | Removed more than 3400 svn '$Id' keywords and related junk.
* As a brief diversion from real work, implemente...Paul Phillips2010-04-061-1/+1
| | | | | | | | | As a brief diversion from real work, implemented Damerau–Levenshtein and ran it on trunk to elicit obvious misspellings. Unfortunately they're mostly in places like compiler comments which real people never see, but I fixed them anyway. All those English Lit majors who peruse our sources are sure to be pleased. No review.
* missing bits of r20746.Martin Odersky2010-02-011-1/+0
|
* Updated copyright notices to 2010Antonio Cunei2009-12-071-1/+1
|
* switch to unnested packages.Martin Odersky2009-07-241-1/+2
|
* More elucidation work on the pattern matcher.Paul Phillips2009-06-301-0/+2
|
* Specialization landed in trunk.Iulian Dragos2009-06-181-1/+4
|
* Updated copyright notices to 2009Antonio Cunei2009-01-091-1/+1
|
* removed more warningsmichelou2008-01-181-2/+2
|
* fixed bug1084Martin Odersky2007-05-141-1/+1
|
* updated deprecated methodsmichelou2007-02-071-3/+3
|
* Fixed bug #799: the super accessors were iterat...Iulian Dragos2006-11-071-1/+1
| | | | | | Fixed bug #799: the super accessors were iterating over class parents, which is not necessary.
* Added comment.Iulian Dragos2006-11-061-0/+1
|
* Added protected accessors in super accessors.Iulian Dragos2006-10-261-0/+6
|
* changed explicit outer schemeMartin Odersky2006-09-111-3/+6
| | | | | repaired tree checkers
* updated svn:keywords and header of TypingTransf...michelou2006-07-131-5/+6
| | | | | updated svn:keywords and header of TypingTransformers.scala
* Added typing tree transformer frameworkMartin Odersky2006-07-121-0/+40