summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Updated copyright to 2013Carlo Dapor2013-01-02121-123/+123
|
* Merge pull request #1823 from paulp/pr/eliminate-allocationsPaul Phillips2012-12-3115-106/+173
|\ | | | | Eliminating allocations.
| * Eliminate allocations in Types.Paul Phillips2012-12-271-35/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At this commit the statistics when compiling src/library are as follows. These counts are precise, collected by a modified Function1 which counts every instantiation of every implementing class. The net result is 27 million fewer allocations, over a 20% drop. // master (5b5635ee9d), total and top five by count: Total Function1 allocations: 128,805,865 scala.collection.immutable.$colon$colon 26781958 scala.collection.mutable.ListBuffer 15365174 scala.collection.TraversableLike$$anonfun$map$1 9127787 scala.collection.generic.Growable$$anonfun$$plus$plus$eq$1 4636154 scala.collection.mutable.StringBuilder 3531211 // After these commits, total and top five by count: Total Function1 allocations: 101,865,721 scala.collection.immutable.$colon$colon 26993704 scala.collection.mutable.ListBuffer 15319656 scala.collection.TraversableLike$$anonfun$map$1 7585019 scala.reflect.internal.Types$MethodType$$anonfun$paramTypes$1 2447307 scala.reflect.internal.Types$SubstSymMap 2436088
| * Eliminate allocations in Trees and Symbols.Paul Phillips2012-12-272-2/+13
| |
| * Eliminate allocations in Specialize.Paul Phillips2012-12-271-4/+5
| |
| * Eliminate allocations in Trees.Paul Phillips2012-12-272-4/+9
| |
| * Eliminate allocations in uncurry and the backend.Paul Phillips2012-12-272-3/+9
| |
| * Eliminate allocations in BaseTypeSeqs.Paul Phillips2012-12-271-2/+10
| |
| * Eliminate allocations in CPSAnnotationChecker.Paul Phillips2012-12-271-3/+5
| |
| * Eliminate allocations in TypeMap.Paul Phillips2012-12-272-3/+8
| |
| * Eliminate allocations in Growable.Paul Phillips2012-12-272-17/+15
| |
| * Eliminating allocations in typeDepth.Paul Phillips2012-12-271-8/+9
| |
| * Eliminating allocations in Codec.Paul Phillips2012-12-271-30/+25
| |
| * Eliminating more allocations in the collections.Paul Phillips2012-12-272-9/+18
| |
| * Eliminate allocations in ClassfileParser.Paul Phillips2012-12-271-6/+10
| |
| * Eliminate allocations in ListBuffer.Paul Phillips2012-12-271-2/+18
| | | | | | | | | | ++= on a linear sequence can be accomplished without closure allocation.
* | Merge pull request #1812 from scalamacros/topic/showrawposEugene Burmako2012-12-302-13/+18
|\ \ | | | | | | showRaw can now print positions
| * | showRaw can now print positionsEugene Burmako2012-12-252-13/+18
| | |
* | | Merge pull request #1816 from scalamacros/topic/enclosuresEugene Burmako2012-12-302-13/+50
|\ \ \ | | | | | | | | enclosures are now strongly typed and are no longer vals
| * | | enclosures are now strongly typed and are no longer valsEugene Burmako2012-12-252-13/+50
| |/ /
* | | Merge pull request #1807 from scalamacros/topic/ident-deprecation-warningsEugene Burmako2012-12-301-1/+10
|\ \ \ | | | | | | | | the scanner is now less eager about deprecations
| * | | the scanner is now less eager about deprecationsEugene Burmako2012-12-251-1/+10
| |/ / | | | | | | | | | | | | | | | When healing braces it isn't very useful to report deprecation warnings, especially since this process is just simple context-free skimming, which can't know about what positions can accept what identifiers.
* | | Merge pull request #1809 from scalamacros/topic/ident-attachmentsPaul Phillips2012-12-291-3/+3
|\ \ \ | | | | | | | | fixes the typedIdent problem for good
| * | | fixes the typedIdent problem for goodEugene Burmako2012-12-281-3/+3
| |/ / | | | | | | | | | | | | | | | Previous attachment retaining fix was only working for Idents which get turned into Selects. Now it works for all transformations applied to Idents (e.g. when an ident refers to something within a package obj).
* | | Merge pull request #1808 from scalamacros/topic/annotation-errorEugene Burmako2012-12-292-7/+8
|\ \ \ | | | | | | | | Moves annotationError outside typedAnnotation
| * | | Moves annotationError outside typedAnnotationEugene Burmako2012-12-252-7/+8
| |/ / | | | | | | | | | | | | This refactoring allows everyone from the compiler, e.g. the macro engine which expands annotation-emitting macros, to produce annotation errors.
* | | Merge pull request #1818 from scalamacros/topic/auto-duplicate-expansionsEugene Burmako2012-12-292-5/+10
|\ \ \ | | | | | | | | macro expansions are now auto-duplicated
| * | | macro expansions are now auto-duplicatedEugene Burmako2012-12-252-5/+10
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix still requires macro developers to be careful about sharing trees by references, because attributed DefTrees will still bring trouble. However this is an improvement, because it doesn't make matters worse and automatically fixes situations similar to one in the test. A much more thorough discussion with a number of open questions left: http://groups.google.com/group/scala-internals/browse_thread/thread/492560d941b315cc
* | | Merge pull request #1814 from scalamacros/topic/reflectionEugene Burmako2012-12-299-12/+54
|\ \ \ | | | | | | | | adds extractors for TypeName, TermName and Modifiers
| * | | cleans up usages of <init>Eugene Burmako2012-12-291-1/+1
| | | |
| * | | Changes tree pretty printer to use shorter name constructorsDen Shabalin2012-12-252-4/+4
| | | |
| * | | Changes reifier to use shorter name constructorsDen Shabalin2012-12-252-3/+3
| | | |
| * | | Adds extractors for TypeName, TermName and ModifiersDen Shabalin2012-12-254-4/+46
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows to pattern match over type names, term names and modifiers. Otherwise it can be quite painful to match over complex trees as each name or modifiers requires a guard. This pull request also changes the name of default constructor for term and type names i.e. TypeName(s) instead of newTermName(s). This is shorter to type, more consistent with the rest of reflection api and consistent with the way it will be pattern matched later on.
* | | Merge pull request #1815 from scalamacros/topic/fresh-nameEugene Burmako2012-12-293-3/+26
|\ \ \ | | | | | | | | renames c.fresh to c.freshName
| * | | renames c.fresh to c.freshNameEugene Burmako2012-12-253-3/+26
| |/ /
* | | Merge pull request #1811 from scalamacros/topic/tree-nonemptyEugene Burmako2012-12-292-0/+8
|\ \ \ | | | | | | | | adds Tree.nonEmpty
| * | | adds Tree.nonEmptyEugene Burmako2012-12-252-0/+8
| |/ / | | | | | | | | | So that trees become consistent with isEmpty on lists and options.
* | | SI-6846, regression in type constructor inference.Paul Phillips2012-12-282-13/+12
| | | | | | | | | | | | | | | | | | | | | In 658ba1b4e6 some inference was gained and some was lost. In this commit we regain what was lost and gain even more. Dealiasing and widening should be fully handled now, as illustrated by the test case.
* | | Cleaning up type alias usage.Paul Phillips2012-12-286-43/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I determined that many if not most of the calls to .normalize have no intent beyond dealiasing the type. In light of this I went call site to call site knocking on doors and asking why exactly they were calling any of .normalize .widen.normalize .normalize.widen and if I didn't like their answers they found themselves introduced to 'dropAliasesAndSingleTypes', the recursive widener and dealiaser which I concluded is necessary after all. Discovered that the object called 'deAlias' actually depends upon calling 'normalize', not 'dealias'. Decided this was sufficient cause to rename it to 'normalizeAliases'. Created dealiasWiden and dealiasWidenChain. Dropped dropAliasesAndSingleTypes in favor of methods on Type alongside dealias and widen (Type#dealiasWiden). These should reduce the number of "hey, the type alias doesn't work" bugs.
* | | Shored up a hidden dealiasing dependency.Paul Phillips2012-12-281-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like the comment says: // This way typedNew always returns a dealiased type. This // used to happen by accident for instantiations without type // arguments due to ad hoc code in typedTypeConstructor, and // annotations depended on it (to the extent that they worked, // which they did not when given a parameterized type alias // which dealiased to an annotation.) typedTypeConstructor // dealiases nothing now, but it makes sense for a "new" to // always be given a dealiased type. PS: Simply running the test suite is becoming more difficult all the time. Running "ant test" includes time consuming activities of niche interest such as all the osgi tests, but test.suite manages to miss the continuations tests.
* | | Fix and simplify typedTypeConstructor.Paul Phillips2012-12-281-21/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Investigating the useful output of devWarning (-Xdev people, it's good for you) led back to this comment: "normalize to get rid of type aliases" You may know that this is not all the normalizing does. Normalizing also turns TypeRefs with unapplied arguments (type constructors) into PolyTypes. That means that when typedParentType would call typedTypeConstructor it would find its parent had morphed into a PolyType. Not that it noticed; it would blithely continue and unwittingly discard the type arguments by way of appliedType (which smoothly logged the incident, thank you appliedType.) The simplification of typedTypeConstructor: There was a whole complicated special treatment of AnyRef here which appears to have become unnecessary. Removed special treatment and lit a candle for regularity. Updated lots of tests regarding newly not-so-special AnyRef.
* | | Removed dead implementation.Paul Phillips2012-12-281-82/+0
| |/ |/| | | | | | | Another "attractive nuisance" burning off time until I realized it was commented out.
* | Merge pull request #1786 from retronym/ticket/6745-3Paul Phillips2012-12-261-12/+33
|\ \ | | | | | | SI-6745 Fix <init> lookup
| * | SI-6745 Fix <init> lookupJason Zaugg2012-12-181-12/+33
| | | | | | | | | | | | | | | | | | We should only consult the decls of the enclosing class. Members of the self type, enclosing scopes, or imports should not be considered.
* | | Merge pull request #1820 from paulp/pr/what-old-patmatPaul Phillips2012-12-2614-2247/+14
|\ \ \ | | | | | | | | Removed old pattern matcher.
| * | | Removed old pattern matcher.Paul Phillips2012-12-2614-2247/+14
| | |/ | |/|
* | | Merge pull request #1806 from paulp/pr/fasttrackPaul Phillips2012-12-264-25/+34
|\ \ \ | |/ / |/| | Rewrote FastTrack for clarity.
| * | Rewrote FastTrack for clarity.Paul Phillips2012-12-234-25/+34
| | | | | | | | | | | | | | | | | | We can say what we wish to say with more directness and with fewer vars, levels of indirection, public members, and implicit conversions.
* | | Merge pull request #1783 from paulp/pr/opt-specializePaul Phillips2012-12-243-12/+27
|\ \ \ | |/ / |/| | Optimization in SpecializeTypes.
| * | Optimization in SpecializeTypes.Paul Phillips2012-12-173-12/+27
| |/ | | | | | | | | Avoid time traveling to find type parameters which will never be there.