summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fixed AnyRef specialization.Paul Phillips2012-02-1711-32/+148
| | | | | | | | | | At least for the value of fix which means "better than it was in 2.9." I accidentally spent a long while trying to fix something I didn't realize I hadn't broken. But then I lucked into partially fixing it, so that's good news. See run/t5488-fn.scala if you want to see what still doesn't work. (It's covered at SI-4770, which is now reopened.) Closes SI-5488.
* Merge remote-tracking branch 'erikrozendaal/SI-5331' into developPaul Phillips2012-02-158-89/+1181
|\
| * Removed TODOs.Erik Rozendaal2012-01-241-2/+2
| |
| * Custom implementations of drop/take/slice.Erik Rozendaal2012-01-235-12/+75
| | | | | | | | This mainly helps performance when comparing keys is expensive.
| * Custom coded version of range/from/to/until.Erik Rozendaal2012-01-214-42/+59
| | | | | | | | | | This avoids unnecessary allocation of Option and Function objects, mostly helping performance of small trees.
| * Optimized implementation of TreeMap/TreeSet#to method.Erik Rozendaal2012-01-156-24/+77
| | | | | | | | Performance of `to` and `until` is now the same.
| * Test for maximum height of red-black tree.Erik Rozendaal2012-01-081-0/+5
| |
| * Fix silly copy-paste error.Erik Rozendaal2012-01-071-9/+9
| |
| * Tests for takeWhile/dropWhile/span.Erik Rozendaal2012-01-074-8/+32
| | | | | | | | Also simplified implementation of span to just use splitAt.
| * Renamed object RedBlack to RedBlackTree.Erik Rozendaal2012-01-076-469/+690
| | | | | | | | | | | | This more clearly separates the new implementation from the now deprecated abstract class RedBlack and avoids naming conflicts for the member classes.
| * Restore old RedBlack class to maintain backwards compatibility.Erik Rozendaal2012-01-064-171/+452
| | | | | | | | | | | | | | | | | | The class is marked as deprecated and no longer used by the TreeMap/TreeSet implementation but is restored in case it was used by anyone else (since it was not marked as private to the Scala collection library). Renamed RedBlack.{Tree,RedTree,BlackTree} to Node, RedNode, and BlackNode to work around name clash with RedBlack class.
| * Deprecate TreeMap.isSmaller and TreeSet.isSmaller.Erik Rozendaal2012-01-062-0/+2
| | | | | | | | | | | | These methods were used by the old RedBlack tree implementation, but are no longer required and were not defined in any interface. Use ordering or compare instead.
| * Add implementation notes. Consistently use eq/ne to compare with null.Erik Rozendaal2012-01-051-7/+24
| |
| * Move nth method to RedBlack. Inline factories for tree nodes.Erik Rozendaal2012-01-053-18/+20
| |
| * Optimize foreach and iterators.Erik Rozendaal2012-01-045-44/+103
| |
| * Use null to represent empty trees. Removed Empty/NonEmpty classes.Erik Rozendaal2012-01-034-404/+367
| |
| * Implemented range without using pattern matching.Erik Rozendaal2012-01-021-9/+14
| |
| * Implemented deletes without pattern matching.Erik Rozendaal2012-01-021-61/+72
| |
| * Moved key/value/left/right fields up to NonEmpty class. Don't relyErik Rozendaal2012-01-023-33/+57
| | | | | | | | on pattern matching for updating the tree.
| * Minimize number of calls to ordering.Erik Rozendaal2011-12-281-13/+14
| |
| * Added some tests for TreeMap/TreeSet.Erik Rozendaal2011-12-282-0/+182
| |
| * Improved performance of RedBlack.NonEmpty.nth (helps take/drop/split/etc).Erik Rozendaal2011-12-281-2/+3
| |
| * Performance improvements for iteration (foreach and iterator).Erik Rozendaal2011-12-283-18/+51
| |
| * TreeMap/TreeSet no longer keep track of the size (the RedBlack treeErik Rozendaal2011-12-282-40/+31
| | | | | | | | already does so).
| * Made RedBlack private to the scala.collection.immutable package.Erik Rozendaal2011-12-282-10/+12
| | | | | | | | | | Use ArrayStack instead of Stack in TreeIterator for slightly increased performance.
| * Make sure the redblack test compiles and runs.Erik Rozendaal2011-12-282-42/+37
| |
| * Use single shared Empty instance across all RedBlack trees.Erik Rozendaal2011-12-283-23/+32
| |
| * Changed abstract class RedBlack to singleton object.Erik Rozendaal2011-12-283-10/+13
| |
| * Moved type parameter A from RedBlack to Tree.Erik Rozendaal2011-12-283-71/+71
| |
| * Moved from Empty case object to case class in preparation of movingErik Rozendaal2011-12-283-15/+15
| | | | | | | | type parameter A.
| * Moved from implicit ordering value to implicit parameter.Erik Rozendaal2011-12-281-17/+15
| |
| * Switched from isSmaller to ordering.Erik Rozendaal2011-12-281-9/+9
| |
| * Implemented takeWhile/dropWhile/span to use tree splitting. ThisErik Rozendaal2011-12-282-0/+26
| | | | | | | | | | changes the operation from O(n log n) to O(n) and allows for more structural sharing.
| * Implemented drop/take/slice/splitAt/dropRight/takeRight forErik Rozendaal2011-12-283-0/+53
| | | | | | | | | | | | TreeMap/TreeSet by splitting the underlying RedBlack tree. This makes the operation O(log n) instead of O(n) and allows more structural sharing.
| * RedBlack.scala: Change count from 'def' to 'val' in NonEmpty treeErik Rozendaal2011-12-281-1/+1
| | | | | | | | | | to ensure TreeSet/TreeMap 'range' operations are O(log n) instead of O(n).
| * Optimized implementation of init/tail for TreeSet/TreeMap.Erik Rozendaal2011-12-282-0/+6
| |
| * Optimized implementations of head/headOption/last/lastOption forErik Rozendaal2011-12-283-0/+19
| | | | | | | | TreeMap/TreeSet.
| * Use custom implementation for iterating over RedBlack trees. RawErik Rozendaal2011-12-281-5/+31
| | | | | | | | performance is much better than '++' based iterator.
| * Use RedBlack.iterator to create iterators for TreeSet/TreeMap.Erik Rozendaal2011-12-282-2/+2
| | | | | | | | | | | | | | This turns iterator creation from an O(n) operation into an O(log n) operation. Unfortunately, it halves actual iteration speed (consuming the iterator fully), probably due to the many by-name closures that are needed.
| |
| \
| \
| \
*---. \ Merge remote-tracking branches 'axel22/issue/5293', ↵Paul Phillips2012-02-1510-20/+777
|\ \ \ \ | | | | | | | | | | | | | | | 'szabolcsberecz/synchronized-test' and 'non/si-5005-2' into develop
| | | * | Added test files to verify previous commit.Erik Osheim2012-02-152-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests scalac -optimize -Xprint:specialize -Ylog:inliner output to verify that final/@inline + specialization are being handled correctly (that is, the original class' specialized methods should not be final/@inline, but its specialized subclass' should be). This test was written by Vlad Ureche based on the bug report in SI-5005.
| | | * | Improve handling of final and @inline in specialization.Erik Osheim2012-02-151-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the specialize phase removed FINAL from all specialized methods, but left the @inline annotation alone, causing warnings. This patch does two things: 1. It only removes final from the original class' methods which are overridden, while leaving it on the specialized subclasses' methods. 2. When removing final, it also removes @inline, to prevent spurious warnings. This was intended to fix SI-5005, however there are deeper problems which prevent inlining from working even with this fixed.
| | * | | test to check for proper synchronization in generated codeSzabolcs Berecz2012-02-153-0/+578
| | | | |
| * | | | Apply the fix for si-5293 to hash maps.Aleksandar Prokopec2012-02-154-16/+122
| | |/ / | |/| | | | | | | | | | This fix was previously only applied to hash sets.
* | | | Major rewrite of sys.process documentation.Daniel C. Sobral2012-02-156-158/+613
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document the stream closing requisite on ProcessIO, document a few stream closing semantics on BasicIO, and then take advantage of my newly-found knowledge and go on a rampage all over sys.process. Also make two methods that were implemented but not present in the public API visible.
* | | | Close file descriptor leak in sys.process.Daniel C. Sobral2012-02-151-6/+12
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This closes most file descriptor leaks in sys.process through the simple expedient of making sure every InputStream being read by BasicIO is closed once there's nothing more to read. A single file descriptor leak would remain for the OutputStream (that is, that process stdin) of each Process, which is closed after the InputStream being read to feed it is closed. Special care is taken not to close the calling process stdin. Fix an additional non-reported by where sending data to a process that had already terminated would result in an exception being thrown. File descriptors can still leak in some conditions that must be handled by user code. Documentation to that effect will follow. Closes SI-5439.
* | | Merge branch 'develop'Paul Phillips2012-02-15120-220/+518
|\ \ \
| | \ \
| | \ \
| *-. \ \ Merge remote-tracking branches 'scalamacros/pullrequest/preprocessreifees' ↵Paul Phillips2012-02-15120-220/+518
| |\ \ \ \ | | | | | | | | | | | | | | | | | | and 'scalamacros/pullrequest/multilineinterpolation' into develop
| | | * | | Makes multiline interpolation work finelyEugene Burmako2012-02-157-3/+106
| | | | | |
| | * | | | Disables typechecking that precedes reflective compilationEugene Burmako2012-02-14105-199/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously toolboxes used to typecheck their inputs before compiling. Actually, the initial demo by Martin first typechecked the reified tree, then ran it, which typechecked it again, and only then launched the reflective compiler. However, as observed in https://issues.scala-lang.org/browse/SI-5464 current implementation of typechecking is not always idempotent. That's why we cannot allow inputs of toolboxes to be typechecked, at least not until the aforementioned issue is closed. This is not only a convention but also a check inside compileExpr.