summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1839 from JamesIry/SI-6908_masterAdriaan Moors2013-01-043-79/+106
|\ | | | | SI-6908 Makes FlatHashTable as well as derived classes support nulls
| * SI-6908 Cleanup of FlatHashTable nulls based on reviewJames Iry2013-01-041-7/+10
| | | | | | | | | | | | | | | | Uses pattern matching in findEntry instead of an if. Uses a named object NullSentinel instead of a val.\ Makes NullSentinel private. Uses isInstanceOf instead of equality on NullSentinel. Makes searchEntry a val instead of a var.
| * SI-6908 Removes cannotStoreNull from FastHashSet/HashSet docsJames Iry2013-01-042-3/+0
| | | | | | | | | | In my main commit I missed the scala doc annotation about not being able to store null.
| * SI-6908 Makes FlatHashTable as well as derived classes support null valuesJames Iry2013-01-033-74/+101
| | | | | | | | | | | | | | This change adds a null sentinel object which is used to indicate that a null value has been inserted in FlatHashTable. It also makes a strong distinction between logical elements of the Set vs entries in the hash table. Changes are made to mutable.HashSet and ParHashSet accordingly.
* | Merge pull request #1830 from ↵Adriaan Moors2013-01-041-2/+6
|\ \ | | | | | | | | | | | | magarciaEPFL/unnest-closures-supplementErrorMessage nested closures are flattened by calling supplementErrorMessage() directly
| * | comments on avoiding closure allocation in Global's assert() and require()Miguel Garcia2013-01-041-0/+2
| | |
| * | nested closures are flattened by calling supplementErrorMessage() directlyMiguel Garcia2012-12-291-2/+4
| | | | | | | | | | | | A closure C that becomes an argument to the constructor of another closure makes both closures harder to eliminate (either by scalac-optimizer or JIT-compiler) than is the case when C is the argument to an @inline method.
* | | Merge pull request #1825 from magarciaEPFL/fusion-Range-foreachAdriaan Moors2013-01-041-8/+14
|\ \ \ | | | | | | | | fusion of loops in Range.foreach() and Range.validateRangeBoundaries()
| * | | fusion of loops in Range.foreach() and Range.validateRangeBoundaries()Miguel Garcia2012-12-281-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | This commit allows closure elimination in more cases. The non-inlined case also benefits from saving a Range.validateRangeBoundaries() invocation. Before this commit, the closure argument to Range.foreach() escaped to Range.validateRangeBoundaries(). As a consequence, closure elimination required inlining both of them. Given that the current optimizer duplicates a closure body whenever that closure's apply() is invoked, the resulting code size taxed the JIT compiler. In particular when apply() delegates to a specialized version, or when a bridge apply() stands in the way.
* | | | Merge pull request #1821 from scalamacros/ticket/6638Adriaan Moors2013-01-044-3/+64
|\ \ \ \ | | | | | | | | | | bind + argc specialization = 20x perf boost
| * | | | a few performance improvements for toArrayEugene Burmako2012-12-282-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First of all the typo I have made when migrating from manifests to tags. `repr.getClass` in `WrappedArray` should read `array.getClass`. Secondly manifests for Any, Object/AnyRef, AnyVal, Null and Nothing now have their `newArray` methods overridden to avoid reflective overhead of array instantiation.
| * | | | bind + argc specialization = 20x perf boostEugene Burmako2012-12-272-2/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Default logic of mirror construction, which gets triggered via reflectField/reflectMethod/reflectConstructor, validates a lot of facts about its arguments. This takes quite a bit of time, which significantly degrades performance of reflection-heavy applications. Proposed two changes provide an order of magnitude performance boost to a simple app, which repeatedly invokes the same method for different receiver instances.
* | | | | Merge pull request #1785 from non/bug/fix-copyToArrayAdriaan Moors2013-01-041-2/+4
|\ \ \ \ \ | | | | | | | | | | | | Fix Iterator#copyToArray (fixes SI-6827).
| * | | | | Fix Iterator#copyToArray (fixes SI-6827).Erik Osheim2012-12-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As pointed out in #scala, when using a non-zero start it's possible to get an ArrayIndexOutOfBoundsException due to an incorrect bounds check. This patch fixes this, as well as another potential bounds error, and adds test cases. Incorporates some other suggestions by Som-Snytt to ensure that callers will get useful error messages in cases where the start parameter is wrong (negative or out-of-array-bounds). Review by @som-snytt.
* | | | | | 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