summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | SI-6253 HashSet should implement unionRüdiger Klaehn2014-01-164-14/+700
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements of HashSet.union that reuses the two trees as much as possible when calculating the union of two sets. This leads to significant performance improvements as well as to much better structural sharing. There is a comprehensive correctness test for union since there was not a single test for HashSet.union before. In addition, there are some tests of the desirable properties of the new implementation (structural sharing and efficiency regarding calls of key.hashCode). The other operations diff and intersect, which are conceptually very similar to union, are also implemented along with comprehensive test cases for both correctness and structural sharing. Note that while it appears that there is some code duplication between the three methods, they are sufficiently different that it is not possible to merge them into one without sacrificing performance.
* | | | | | Merge pull request #3278 from magarciaEPFL/backendish48Adriaan Moors2014-01-169-19/+67
|\ \ \ \ \ \ | | | | | | | | | | | | | | improvements to GenBCode
| * | | | | | overzealous assert in BCodeBodyBuilder rejected throw nullMiguel Garcia2013-12-162-1/+10
| | | | | | |
| * | | | | | removing defensive code made obsolete by existing fix to SI-5604Miguel Garcia2013-12-162-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SI-5604 was fixed in commit e6f10b07d44f0ddde26246b4a41527a84eede81c
| * | | | | | overzealous assert in GenBCodeMiguel Garcia2013-12-152-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assert in question was aimed at ruling out gotos (ie "jumping-applys") in actual argument position of a jumping-apply. But the assert in question went overboard to also rule out a LabelDef in actual argument position. This commit removes the assert in question altogether. The unwanted behaviors, and only those, are rule out by the test added in this commit and the existing tests for SI-6089. See also https://issues.scala-lang.org/browse/SI-7749
| * | | | | | removing dead code in BCodeSyncAndTryMiguel Garcia2013-12-151-4/+0
| | | | | | |
| * | | | | | there's a reason for this code in GenBCodeMiguel Garcia2013-12-154-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aced32d05c97651534f468bc9a475ea5f6ae75b8 removed unused code, along with code that populates a cache with entries needed in some program runs. I'm re-adding the latter.
| * | | | | | GenBCode version of "not eliminate loadmodule on static methods."Miguel Garcia2013-12-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f27f2d80d759130597b652d6cc9d789f8c472e5a modifies GenASM, we follow suite here, making test/files/run/static-module-method.scala pass under GenBCode.
| * | | | | | GenBCode version of "Updating Position call sites" commitMiguel Garcia2013-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 7d62df035cd4393c73e7530e1cad1130e79d90c6 modifies GenASM, we follow suite here.
* | | | | | | Merge pull request #3340 from huitseeker/issues/sourceFlagAdriaan Moors2014-01-163-38/+45
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-8126 adds a -source option to let (parts of) the compiler run on older code
| * | | | | | | SI-8126 Puts SI-7335 fix behind a source level flagFrançois Garillot2014-01-161-1/+1
| | | | | | | |
| * | | | | | | SI-8126 Puts SI-6899 fix under a source level flagFrançois Garillot2014-01-161-1/+1
| | | | | | | |
| * | | | | | | SI-8126 Add a '-Xsource' flag allowing compilation in e.g. 2.10 modeFrançois Garillot2014-01-161-36/+43
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | This is aimed at letting the 2.11+ compiler operate, at least until phase:typer, on a 2.10 codebase.
* | | | | | | Merge pull request #3319 from Ichoran/issue/4370Adriaan Moors2014-01-162-20/+194
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Range bug: Wrong result for Long.MinValue to Long.MaxValue by In...
| * | | | | | | SI-4370 Range bug: Wrong result for Long.MinValue to Long.MaxValue by ↵Rex Kerr2014-01-152-20/+194
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Int.MaxValue Fixed by rewriting the entire logic for the count method. This is necessary because the old code was making all kinds of assumptions about what numbers were, but the interface is completely generic. Those assumptions still made have been explicitly specified. Note that you have to make some or you end up doing a binary search, which is not exactly fast. The existing routine is 10-20% slower than the old (broken) one in the worst cases. This seems close enough to me to not bother special-casing Long and BigInt, though I note that this could be done for improved performance. Note that ranges that end up in Int ranges defer to Range for count. We can't assume that one is the smallest increment, so both endpoints and the step need to be Int. A new JUnit test has been added to verify that the test works. It secretly contains an alternate BigInt implementation, but that is a lot slower (>5x) than Long.
* | | | | | | Merge pull request #3372 from densh/si/8148Adriaan Moors2014-01-162-2/+7
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | fix anonymous functions with placeholders in quasiquotes
| * | | | | | SI-8148 fix anonymous functions with placeholdersDenys Shabalin2014-01-162-2/+7
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quasiquotes used to fail to generate proper fresh identifiers for anonymous functions like: q"_ + _" Due to improper initialization of FreshNameCreator in quasiquote parser which was erroneously not preserved throughout parsing of the code snippet but re-created on every invocation.
* | | | | | Merge pull request #3370 from Ichoran/topic/fix-t6200Ichoran2014-01-151-3/+3
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | Repairs unexpected failure of test t6200.scala. No review; putting fix in as fast as possible.
| * | | | | Repairs unexpected failure of test t6200.scalaRex Kerr2014-01-151-3/+3
|/ / / / / | | | | | | | | | | | | | | | Added extra ()'s to get rid of deprecation warning for inferring unit arg.
* | | | | Merge pull request #3318 from rklaehn/issue/6196Ichoran2014-01-154-0/+379
|\ \ \ \ \ | | | | | | | | | | | | SI-6196 - Set should implement filter
| * | | | | SI-6200 - HashMap should implement filterRüdiger Klaehn2014-01-152-0/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the exact same algorithm as in SI-6196, with only slight differences due to the two type arguments of HashMap. Filter is tested by the new comparative collection test by @Ichoran, but there is nevertheless a small correctness test in t6200 in addition to tests of the new desirable behavior.
| * | | | | SI-6196 - Set should implement filterRüdiger Klaehn2014-01-152-0/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements a version of filter and filterNot that reuses as much as possible from the existing tree instead of building an entirely new one like the builder-based filter does. This results in significant performance improvements on average. Adds a test of basic correctness of filter and filterNot as well as of the desirable properties of the new filter implementation. This is a collaboration between me and @Ichoran
* | | | | | Merge pull request #3362 from som-snytt/issue/7544-scaladocAdriaan Moors2014-01-151-3/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7544 StringContext.f docs update
| * | | | | | SI-7544 StringContext.f docs updateSom Snytt2014-01-131-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct the scaladoc to reflect how f"%" is handled, namely, it's no longer taken as f"%%".
* | | | | | | Merge pull request #3366 from Ichoran/issue/6457Adriaan Moors2014-01-154-6/+8
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-6457 ImmutableSetFactory.empty results in StackOverflowError
| * | | | | | | SI-6457 ImmutableSetFactory.empty results in StackOverflowErrorRex Kerr2014-01-144-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ImmutableSetFactory relies upon empty to create its builder, which in turn relies upon its builder to create an empty. Added an emptyInstance method to hold the actual empty set (which also removes duplicated functionality for empty sets). No test, as the original pattern: object Factory extends collection.generic.ImmutableSetFactory[collection.immutable.Set] {} no longer compiles. This should be verified by whoever checks this commit, but this kind of change is hard to revert by accident. No reason to waste resources checking it forevermore.
* | | | | | | | Merge pull request #3316 from Ichoran/topic/big-decimal-correctnessAdriaan Moors2014-01-157-90/+674
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Quasi-comprehensive BigDecimal soundness/correctness fix.
| * | | | | | | | Quasi-comprehensive BigDecimal soundness/correctness fix.Rex Kerr2014-01-147-90/+674
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes issues SI-6153, SI-6173, SI-6456, SI-6699, and SI-8116, along with a number of other similar possible issues. Relevant changes include * Changes to avoid heap explosion when working with BigInt - to isWhole - to hashCode - to equals - to BigInt's equals * Changes to enable equality matching hashCode - Only for sufficiently small BigInt - For identical values with different precision * Changes to isValidDouble - Takes precision into account now - New methods added to test whether even if the Double is not represented exactly, it's a representation of a certain type - New companion methods added to allow intended expansion of Double (binary/decimal difference) * Changes to constructor - Null arguments are not allowed (these can throw NPEs later at awkward/unexpected times) * New JUnit test to test all these things * Fixed existing tests to expect new behavior * Modified scaladocs to explain the issues * Deprecated problematic methods * Made application of MathContext more consistent (it is where you expect it and not where you don't) These changes are coordinated, for the most part, hence the monolithic commit.
* | | | | | | | | Merge pull request #3304 from non/bug/stream-flatten2-8100Adriaan Moors2014-01-153-8/+19
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | SI-8100 - prevent possible SOE during Stream#flatten.
| * | | | | | | | | SI-8100 - prevent possible SOE during Stream#flatten.Erik Osheim2013-12-243-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes stream flatten to avoid allocating a stack frame for every stream item. Previously, flattening a stream whose elements are mostly empty would result in a StackOverflowException. This commit also adds a test demonstrating the problem.
* | | | | | | | | | Merge pull request #3293 from soc/SI-7469Adriaan Moors2014-01-1511-39/+18
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Remove misc. @deprecated elements
| * | | | | | | | | | SI-7469 Remove misc. @deprecated elementsSimon Ochsenreither2014-01-0911-39/+18
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #3285 from som-snytt/issue/8015-FF-NLsAdriaan Moors2014-01-1510-35/+113
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Count lines by EOLs
| * | | | | | | | | | | SI-8015 Refactor per code reviewSom Snytt2014-01-132-27/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make an obscure private def local and rename it usefully. If you really must have similar functions in the API (to detect line breaks and EOL), at least make them DRY.
| * | | | | | | | | | | SI-8015 Carat => CaretVisitor2014-01-081-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just a diamond in the rough. Wikipedia warns against confusing it with "carrot." The first word should really be pronounced as the garage phrase, "Where's the car at?" and the second like "beret."
| * | | | | | | | | | | SI-8015 Unprintables in messagesSom Snytt2014-01-083-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The line content to display should include the whole line, inclusive of embedded line breaks, and any control chars should be displayed in unicode escape.
| * | | | | | | | | | | SI-8015 Count lines by EOLsSom Snytt2014-01-089-24/+80
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Source lines were counted by "line break chars", including FF. Clients of `pos.line` seem to all expect the ordinary line num, so that is what they get. Unicode processing now precedes line ending processing.
* | | | | | | | | | | Merge pull request #3260 from soc/SI-8035Adriaan Moors2014-01-1522-178/+233
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Deprecate automatic () insertion in argument lists
| * | | | | | | | | | | SI-8035 Deprecate automatic () insertion in argument listsSimon Ochsenreither2014-01-0922-178/+233
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This promotes the () insertion warning from -Ywarn-adapted-args to a deprecation warning. -Xfuture tunrs it into a compiler error. Auto tupling remains unchanged for now. The tests have been fixed the following way: - Warnings caused by general sloppiness (Try(), Future(), ...) have been fixed. - Warnings which raise interesting questions (x == (), ...) received an updated checkfile for now.
* | | | | | | | | | | Merge pull request #3317 from qerub/si-8107-add-regex-quoteAdriaan Moors2014-01-155-11/+18
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | SI-8107: Add Regex.quote
| * | | | | | | | | | | SI-8107: Use Regex.quoteChristoffer Sawicki2013-12-294-11/+10
| | | | | | | | | | | |
| * | | | | | | | | | | SI-8107: Add Regex.quoteChristoffer Sawicki2013-12-291-0/+8
| | | | | | | | | | | |
* | | | | | | | | | | | Merge pull request #3320 from Ichoran/issue/8081Adriaan Moors2014-01-151-2/+50
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ / / / / |/| | | | | | | | | | | SI-8081 unzip/unzip3 return wrong static type when applied to Arrays
| * | | | | | | | | | | SI-8081 unzip/unzip3 return wrong static type when applied to ArraysRex Kerr2014-01-141-2/+50
| | |_|_|/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added unzip and unzip3 methods to ArrayOps so that we get proper return values. (No tests due to unfavorable effort/reward ratio for an ongoing test of something so simple.)
* | | | | | | | | | | Merge pull request #3321 from VladimirNik/sprinterJason Zaugg2014-01-154-131/+1502
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add tree-based code generation
| * | | | | | | | | | | toCode renamed to showCodeVladimirNik2014-01-133-5/+5
| | | | | | | | | | | |
| * | | | | | | | | | | Code cleanup based on pull request commentsVladimirNik2014-01-071-65/+56
| | | | | | | | | | | |
| * | | | | | | | | | | Annotated trees processing is modifiedVladimirNik2014-01-072-22/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Problem with multiple parameter lists in annotations is resolved 2. Tests for Annotated trees are added
| * | | | | | | | | | | Printers code refactoring and cleanupVladimirNik2014-01-051-251/+188
| | | | | | | | | | | |
| * | | | | | | | | | | Tests for ParsedTreePrinterVladimirNik2014-01-051-0/+786
| | | | | | | | | | | |