summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* pull request feedbackPavel Pavlov2012-09-1816-28/+139
|
* Making public methods of FlatHashTable protectedPavel Pavlov2012-08-294-12/+14
| | | | As discussed in https://groups.google.com/forum/?pli=1#!topic/scala-internals/1yABM30POS0
* SI-5767 fix + small HashSet/HashMap fixesPavel Pavlov2012-08-276-72/+141
| | | | | | | | | | - `LinkedHashSet` implementation moved from `FlatHashTable` to `HashTable` - `remove` time reduced from O(n) to O(1) - `diff` time reduced from O(n^2) to O(n) - A bit of refactoring in `HashTable` serialization code - Putting an element into hash map now avoids double hash code/hash index calculation (see `HashTable#findOrAddEntry`) - bugfix: compiler/LambdaLift occasionally breaks LinkedHashSet integrity
* Merge pull request #1194 from scalamacros/ticket/6281Eugene Burmako2012-08-255-7/+70
|\ | | | | SI-6281 macroArgs for defs with implicit args
| * SI-6281 macroArgs for defs with implicit argsEugene Burmako2012-08-255-7/+70
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | macroArgs now correctly calculates the argss in case when a macro def has implicit parameters. Macro impls can never have implicit parameters other than type tag evidences, so tags will always come in a separate parameter list w.r.t other parameters of macro impls (which are in 1-to-1 correspondence with the parameters of macro defs). Example 1: def w/o implicits: (params1)...(paramsN) impl w/o tags: (params1')...(paramsN') Example 2: def w/o implicits: (params1)...(paramsN) impl w tags: (params1')...(paramsN')(implicit tags) Example 3: def w implicits: (params1)...(paramsN)(implicit paramsN+1) impl w/o tags: (params1')...(paramsN')(paramsN+1') Note: paramsN+1' is not an implicit parameter list because impls cannot have implicit parameters other than tags Example 4: def w implicits: (params1)...(paramsN)(implicit paramsN+1) impl w tags: (params1')...(paramsN')(paramsN+1')(implicit tags) Therefore we don't need to merge the argss.last (that correspond to implicit parameters of macro defs) with tags, as it was incorrectly coded before. We just need to append tags to argss.
* Merge pull request #1190 from axel22/issue/6052-2.10.xJosh Suereth2012-08-242-3/+23
|\ | | | | SI-6052 - fix groupBy on parallel collections
| * SI-6052 - fix groupBy on parallel collectionsAleksandar Prokopec2012-08-242-3/+23
|/
* Merge pull request #1178 from scalamacros/topic/weak-subtypePaul Phillips2012-08-231-0/+4
|\ | | | | adds weak_<:< to the API
| * adds weak_<:< to the APIEugene Burmako2012-08-211-0/+4
| | | | | | | | | | quite a fundamental method to be left to be implemented manually by the users of the reflection API
* | Merge pull request #1170 from scalamacros/topic/overridenPaul Phillips2012-08-231-0/+3
|\ \ | | | | | | exposes overridenSymbol/overridingSymbol in API
| * | exposes the notion on overriding in the APIEugene Burmako2012-08-211-0/+3
| |/ | | | | | | it seems like we completely overlooked this functionality
* | Merge pull request #1179 from scalamacros/topic/classtag-of-nothingPaul Phillips2012-08-232-37/+32
|\ \ | | | | | | reverts changes to ClassTag.Nothing
| * | reverts changes to ClassTag.NothingEugene Burmako2012-08-222-37/+32
| |/ | | | | | | | | | | | | | | It seemed to be a good idea to have ClassTag.Nothing crash in agreement with its incalculable nature. However this breaks CanBuildFrom for the situations when Nothing is inferred or provided explicitly. Hence the rollback.
* | Merge pull request #1182 from paulp/issue/1987Josh Suereth2012-08-237-2/+53
|\ \ | | | | | | Improved fix for SI-1987, overloading in package objects.
| * | Improved fix for SI-1987, overloading in package objects.Paul Phillips2012-08-227-2/+53
| | | | | | | | | | | | | | | | | | When reformulating an errant package object overload, don't forget to fully qualify it lest you trade one error for another.
* | | Merge pull request #1177 from scalamacros/topic/abstypeofJosh Suereth2012-08-233-0/+6
|\ \ \ | | | | | | | | exposes absTypeTag and absTypeOf
| * | | exposes absTypeTag and absTypeOfEugene Burmako2012-08-213-0/+6
| | |/ | |/| | | | | | | | | | | | | | | | to be symmetric with typeTag and typeOf. this is especially important for macro development, since only c.AbsTypeTag context bounds can be used on macro implementations
* | | Merge pull request #1172 from Blaisorblade/topic/deprecated-conversionJosh Suereth2012-08-235-2/+56
|\ \ \ | | | | | | | | JavaConversions: Restore source compatibility with 2.9
| * | | Ensure implicit conversions to concurrent map are unambiguousPaolo Giarrusso2012-08-223-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even after the parent change, implicit conversions should still convert ConcurrentHashMap to concurrent.Map and not to mutable.ConcurrentMap. I'll include the comment by axel22 which prompting this change (taken from https://github.com/scala/scala/pull/1172#issuecomment-7928285) since it is highly informative and links to pull request comments might not be very stable: << Instead of just testing an implicit conversion to ConcurrentMap, the test should call ConcurrentMap methods such as putIfAbsent (which returns an Option[T]) and replace, to see if the correct Scala concurrent map trait is being resolved. The problem is that putIfAbsent already exists on juc.ConcurrentMap so instead of triggering an implicit conversion, a type mismatch error is output anyway. And we cannot test that the correct concurrent map trait is returned using methods like map, flatMap and friends, because concurrent map traits extends mutable.Map anyway. For this reason, I recommend to add this to the test: scala> val a = new java.util.concurrent.ConcurrentHashMap[String, String]() += (("", "")) a: scala.collection.concurrent.Map[String,String] = Map("" -> "") and make sure that the returned map is concurrent.Map, not mutable.ConcurrentMap (the above += is one of the few methods in collection that has the return type this.type). >>
| * | | JavaConversions: Restore source compatibility with 2.9Paolo Giarrusso2012-08-203-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Readd an implicit conversion which was available in 2.9, the one from `java.util.concurrent.ConcurrentMap` (`juc.ConcurrentMap`) to the (now deprecated) type `scala.collection.mutable.ConcurrentMap`. This implicit conversion can also be used to convert from `juc.ConcurrentMap` to `collection.Map` and creates an ambiguity error in test/files/run/map_java_conversions.scala. To fix this, I have given lower priority to the new conversion. Moreover, update the documentation in `JavaConversions`: mark this conversion as deprecated and mention the new conversion which replaces it, converting to `scala.collection.concurrent.Map`. I discussed this issue previously with Paul Phillips on scala-language: https://groups.google.com/d/topic/scala-language/uXKRiGXb-44/discussion
* | | | Merge pull request #1183 from jsuereth/fix/try-catch-inversionJosh Suereth2012-08-233-1/+3
|\ \ \ \ | |_|_|/ |/| | | Fix stupid logic inversion of try-catch
| * | | Fix stupid logic inversion of try-catchJosh Suereth2012-08-213-1/+3
| | | |
* | | | Merge pull request #1167 from Blaisorblade/topic/stream-const-spaceGrzegorz Kossakowski2012-08-222-12/+74
|\ \ \ \ | |_|_|/ |/| | | Make Stream.withFilter.{map,flatMap} run in constant stack space
| * | | Also check that Stream.toSeq gives the right result.Paolo Giarrusso2012-08-221-1/+3
| | | |
| * | | Improve test for Stream.withFilter.{map,flatMap}Paolo Giarrusso2012-08-221-10/+40
| | | | | | | | | | | | | | | | Test a wider range of functionality.
| * | | Cleanup testcasePaolo Giarrusso2012-08-202-6/+2
| | | | | | | | | | | | | | | | | | | | No need to check the output - checking programmatically that the produced streams are empty is enough.
| * | | Remove commented out codePaolo Giarrusso2012-08-201-17/+0
| | | |
| * | | Make Stream.withFilter.{map,flatMap} run in constant stack spacePaolo Giarrusso2012-08-203-0/+51
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The included test currently fails because `map` and `flatMap` do not run in constant stack space on a stream returned by `Stream.withFilter`, as I reported here: https://groups.google.com/d/msg/scala-language/WqJR38REXnk/saaSiDdmyqoJ Fix the problem and add a simple testcase. Note that the stack space consumed when producing an element of this stream is proportional to the number of elements failing the test before the next success. The stack space consumed to produce the stream itself is the space needed to produce the first element, that is, is proportional to the number of failures before the first success.
* | | Merge pull request #1176 from scalamacros/topic/nondeterministicPaul Phillips2012-08-214-36/+2
|\ \ \ | | | | | | | | fixes non-determinism in reflection-sorted-decls
| * | | fixes non-determinism in reflection-sorted-declsEugene Burmako2012-08-214-36/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | ordering of synthetic members on java7 with a lot of cores is non-deterministic that's not a problem, because the doc doesn't promise anything about synthetics hence I've adjusted the test, so that it no longer includes accessors discussion: http://groups.google.com/group/scala-internals/msg/087a7d4805313561
* | | Merge pull request #1174 from paulp/issue/6264Paul Phillips2012-08-214-8/+22
|\ \ \ | |/ / |/| | Fix for SI-6264, crash in checkCheckable.
| * | Fix for SI-6264, crash in checkCheckable.Paul Phillips2012-08-214-8/+22
|/ / | | | | | | | | The classic fail of assuming you will only receive a specific subclass of Type.
* | Merge pull request #1166 from scalamacros/topic/starrv2.10.0-M7Eugene Burmako2012-08-206-6/+6
|\ \ | | | | | | rebuilt the starr after performance optimizations
| * | rebuilt the starr after performance optimizationsEugene Burmako2012-08-206-6/+6
| | | | | | | | | | | | for those who use locker as their main development platform
* | | Merge pull request #1165 from jsuereth/fix/try-catch-libsJosh Suereth2012-08-203-27/+34
|\ \ \ | |/ / |/| | Fix/try catch libs
| * | Adding test for try-catch library unification.Josh Suereth2012-08-202-0/+18
| | |
| * | Unify scala.util.control.Exception with scala.util.TryJosh Suereth2012-08-201-27/+16
| |/
* | Merge pull request #1164 from gkossakowski/topic/optJosh Suereth2012-08-2041-2096/+2835
|\ \ | |/ |/| Compiler optimizations (take 3, hopefully final)
| * Attempts to improve inlining behavior for map, flatMap.Grzegorz Kossakowski2012-08-202-5/+33
| | | | | | | | | | | | | | Reduced method size of map/flatMap to under 35 bytes to make them inlinable. Also specialized filterNot code so that it does not create a second closure. Finally, avoided default argument for sizeHint to reduce size of methods calling it.
| * Slightly less drastic disabling of statistics.Martin Odersky2012-08-201-12/+12
| | | | | | | | All statistics code is now subject to a switch at each use site, as opposed to a compile-time constant before. We should veryfy that this does not affect performance. Statistics is a useful ability to have for trouble-shooting compile time speeds on specific code bases. But we should not pay a lot for having it on normal runs.
| * Reverted closure hoisting except for functions returning a Boolean resultMartin Odersky2012-08-2013-57/+45
| | | | | | | | | | | | If our theory wrt map is correct (i.e. that it gets inlined by JVM), then closure hoisting is counter-productive because it migh well prevent the closure from being inlined. This commit removes all hoisted closures that are passed to map and leaves only those boolean closures that are passed to exists and forall. I should have split the early optimizations including closures into separate commits. As that train has left, I am now reverting some bits to see whether the reverts affect performance at all, and in what direction.
| * Some more closure hositing/eliminationMartin Odersky2012-08-202-7/+15
| |
| * Made all statistic code disappear unless built with Statistics.canEnable = trueMartin Odersky2012-08-2011-123/+138
| |
| * Partial revert of itransform commit.Martin Odersky2012-08-201-52/+43
| | | | | | | | Profile data actually showed a small slowdown in steady state. We keep the reordering but merge all submethods into one.
| * Reverted addition of 5 specialized method from LinearSeqOptimized to List.Martin Odersky2012-08-201-56/+0
| | | | | | | | It seems any gains were more then compensated by the loss of making map polymorphic, probably preventing inlining decisions in Hotspot.
| * Manaul inling of `UndoLog.undoUnless`.Grzegorz Kossakowski2012-08-202-25/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | Inline `UndoLog.undoUnless` into `isSubType` and `isSameType` methods. They are responsible for 20% of all Function0 allocations. I had to do manual inlining because inlier doesn't cope with exception handlers well. Let it be noted that I almost cried while doing this ugly change. I'll want to see inliner being fixed so we can revert this change ASAP.
| * Optimizations to SymTree and transformMartin Odersky2012-08-202-85/+97
| | | | | | | | | | | | | | Two optimizations: (1) Make SymTree a class rather than a trait to allow faster access to symbol (2) Split itransform into several smaller methods and order cases according to expected frequency.
| * Specialize hashCode in TypeRef from the generic MurmurHashCode3 implementation.Martin Odersky2012-08-201-1/+15
| |
| * Moved five methods from LinearSeqOptimized to ListMartin Odersky2012-08-202-58/+56
| | | | | | | | | | | | | | | | Curiously, profiling showed that these methods (in particular map) got slower when specialized in LinearSeqOptimized from their generic impl in TraversableLike. I speculate that the virtual calls to head/tail/nonEmpty are more expensive than the closure creation which we save (Note that foreach IS specialized in List, so head/tail are monomorphic, even though isEmpty still has two implementations. If we confirm a speedup in this commit it would make sense to specialize more methods in LinearSeqOptimized again in List.
| * Don't allocate closure in List.hashCode.Grzegorz Kossakowski2012-08-201-1/+19
| | | | | | | | | | | | | | | | | | | | Provided specialized version of hashing algorithm for List that does not allocate the closure. This saves us 124k closures allocated in a compiler when compiling `Vector.scala` from std library. That's aroudn 5% of all closures allocated for that compiler run.