summaryrefslogtreecommitdiff
path: root/test/files/run
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | SI-5313 Do not eliminate stores that potentially wipe referenesJames Iry2013-01-282-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Storing to local variables of reference or array type is indirectly observable because it potentially allows gc to collect an object. So this commit makes DeadCodeElimination mark a store necessary if it assigns to a local that potentially stored by a previous necessary store.
* | | | | | Merge pull request #2039 from scalamacros/ticket/7046Eugene Burmako2013-02-042-0/+15
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7046 reflection now auto-initializes knownDirectSubclasses
| * | | | | | SI-7046 reflection now auto-initializes knownDirectSubclassesEugene Burmako2013-01-312-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | knownDirectSubclasses joins the happy family of flags, annotations and privateWithin, which automatically trigger initialization, when used within runtime reflection.
* | | | | | | Merge pull request #2022 from lrytz/analyzerPlugins210Lukas Rytz2013-02-035-1/+344
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Analyzer Plugins
| * | | | | | | Analyzer PluginsLukas Rytz2013-02-032-0/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AnnotationCheckers are insufficient because they live outside the compiler cake and it's not possible to pass a Typer into an annotation checker. Analyzer plugins hook into important places of the compiler: - when the namer assigns a type to a symbol (plus a special hook for accessors) - before typing a tree, to modify the expected type - after typing a tree, to modify the type assigned to the tree Analyzer plugins and annotation checker can be activated only during selected phases of the compiler. Refactored the CPS plugin to use an analyzer plugin (since adaptToAnnotations is now part of analyzer plugins, no longer annotation checkers).
| * | | | | | | SI-1803, plus documentation and cleanups in Namers, mainly in typeSigLukas Rytz2013-02-032-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - when typing (and naming) a ValDef, tpt and rhs are now type checked in the same context (the inner / ValDef context). this does not change any behavior, but is more uniform (same as for DefDef). martin told me (offline) that this change is desirable if it doesn't break anything. (it doesn't). - typeSig is now more uniform with a separate method for each case (methodSig, valDefSig, etc). methodSig was cleaned up (no more variables) and documented. the type returned by methodSig no longer contains / refers to type skolems, but to the actual type parameters (so we don't need to replace the skolems lateron). - documentation on constructor contexts, type skolems - more tests for SI-5543
| * | | | | | | case module toString is syntheticLukas Rytz2013-02-031-1/+1
| | | | | | | |
* | | | | | | | Merge pull request #2033 from adriaanm/patmat-optAdriaan Moors2013-02-033-120/+110
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | pattern matching efficiency: addresses SI-6686 and SI-6941, affects SI-5739
| * | | | | | | SI-6686 drop valdef unused in flatMapCond's blockAdriaan Moors2013-01-312-73/+69
| | | | | | | |
| * | | | | | | don't store subpats bound to underscoreAdriaan Moors2013-01-311-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | also, tweak fix in place for SI-5158 to appease SI-6941 don't store mutable fields from scala.* as we can assume these classes are well-behaved and do not mutate their case class fields
| * | | | | | | no null check for type-tested unapply argAdriaan Moors2013-01-311-103/+103
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pattern matching on case classes where pattern is not known to be a subclass of the unapply's argument type used to result in code like: ``` if (x1.isInstanceOf[Foo]) { val x2 = x1.asInstanceOf[Foo] if (x2 != null) { // redundant ... } } ``` this wastes byte code on the redundant null check with this patch, when previous type tests imply the variable cannot be null, there's no null check
* | | | | | | Merge pull request #1979 from retronym/backport/1499James Iry2013-02-012-0/+41
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | [backport] Fix for SI-6206, inconsistency with apply.
| * | | | | | | [backport] Fix for SI-6206, inconsistency with apply.Jason Zaugg2013-01-262-0/+41
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit f6bbf85150cfd7e461989ec1d6765ff4b4aeba51 Author: Paul Phillips <paulp@improving.org> Date: Mon Oct 1 09:10:45 2012 -0700 Fix for SI-6206, inconsistency with apply. The code part of this patch is 100% written by retronym, who apparently has higher standards than I do because I found it just lying around in his repository. I think I'll go pick through his trash and see if he's throwing away any perfectly good muffins. I made the test case more exciting so as to feel useful. (cherry picked from commit 267650cf9c3b07e360a59f3c5b70b37fea9de453)
* | | | | | | Merge pull request #2026 from JamesIry/2.10.x_SI-2818Grzegorz Kossakowski2013-02-012-0/+10
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | SI-2818 Makes List#foldRight work for large lists
| * | | | | | SI-2818 Make List.foldRight always do a reverse/foldLeft flipJames Iry2013-01-312-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Benchmarks show that lists smaller than 110 elements or so doing reverse/foldLeft is faster than recursively walking to the end of the list and then folding as the stack unwinds. Above that 110 element threshold the recursive procedure is faster. Unfortunately, at some magic unknown large size the recursive procedure blows the stack. This commit changes List#foldRight to always do reverse/foldLeft.
* | | | | | | Merge pull request #2043 from lrytz/t3353Adriaan Moors2013-02-012-0/+11
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-3353 don't extract <unapply-selector> into named-arg local val
| * | | | | | | SI-3353 don't extract <unapply-selector> into named-arg local valLukas Rytz2013-01-312-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This already fixes all of SI-3353 because no named-args-block is generated anymore (they are avoided if they have a single expr). So the same NPE in extractorFormalTypes as described in the ticket is no longer triggered. I think that's all there is to fix, since extractor patterns are translated to unapply calls with one argument, i think it's not possible to write a pattern that would result in a named-apply block.
* | | | | | | | Merge pull request #1960 from ViniciusMiana/2.10.xJames Iry2013-02-011-0/+18
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / |/| | | | | | | SI-6853 changed private method remove to be tail recursive.
| * | | | | | | SI-6853 changed private method remove to be tail recursive.Vinicius Miana2013-01-251-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Operations += and -= on mutable.ListMap rely on the private method remove to perform. This methods was implemented using recursion, but it was not tail recursive. When the ListMap got too big the += caused a StackOverflowError.
* | | | | | | | Merge pull request #2015 from paulp/rc1-backportsPaul Phillips2013-01-317-0/+119
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | 10 backports
| * | | | | | | | SI-6584, Stream#distinct uses too much memory.Paul Phillips2013-01-302-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [backport] Nesting recursive calls in Stream is always a dicey business.
| * | | | | | | | SI-5604, selections on package objects.Paul Phillips2013-01-302-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [backport] mkAttributedSelect, which creates a Select tree based on a symbol, has been a major source of package object bugs, because it has not been accurately identifying selections on package objects. When selecting foo.bar, if foo turns out to be a package object, the created Select tree must be foo.`package`.bar However mkAttributedSelect was only examining the owner of the symbol, which means it would work if the package object defined bar directly, but not if it inherited it.
| * | | | | | | | SI-4729, overriding java varargs in scala.Paul Phillips2013-01-303-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [backport] This was a bad interaction between anonymous subclasses and bridge methods. new Foo { override def bar = 5 } Scala figures it can mark "bar" private since hey, what's the difference. The problem is that if it was overriding a java-defined varargs method in scala, the bridge method logic says "Oh, it's private? Then you don't need a varargs bridge." Hey scalac, you're the one that made me private! You made me like this! You! Conflicts: src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
| * | | | | | | | SI-2418, remove restriction on final vars.Paul Phillips2013-01-302-0/+11
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [backport] The original fix for SI-2418 excluded final vars entirely, but the problem was not final vars per se, but the emission of ACC_FINAL in combination with ACC_VOLATILE. Since vars never get ACC_FINAL now, this is no longer an issue.
* | | | | | | | Merge pull request #2006 from retronym/backport/1226Paul Phillips2013-01-312-0/+36
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | [backport] SI-6301 / SI-6572 specialization regressions
| * | | | | | | | SI-6572 Test case, originally fixed in a3680be.Jason Zaugg2013-01-292-0/+36
| | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That fix has now been backported to 2.10.x in the previous commit. This commit should be be merged to master.
* | | | | | | | Merge pull request #2037 from JamesIry/2.10.x_SI-2418Paul Phillips2013-01-312-0/+11
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | [backport] Removed restriction on final vars, SI-2418.
| * | | | | | | | [backport] Removed restriction on final vars, SI-2418.Paul Phillips2013-01-312-0/+11
| | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of b79c7600544db9964c228b94a2f70f3ed854f89b The original fix for SI-2418 excluded final vars entirely, but the problem was not final vars per se, but the emission of ACC_FINAL in combination with ACC_VOLATILE. Since vars never get ACC_FINAL now, this is no longer an issue.
* | | | | | | | Merge pull request #2034 from scalamacros/topic/reify-staticXXXPaul Phillips2013-01-311-18/+18
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | evicts eponymous packages and objects from tests
| * | | | | | | evicts eponymous packages and objects from testsEugene Burmako2013-01-311-18/+18
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As I figured out from http://groups.google.com/group/scala-internals/browse_thread/thread/ace970a799dcf7a0, current behavior with same-named objects silently taking precedence over same-named packages is a bug and shouldn't be relied upon.
* | | | | | | Merge pull request #1989 from adriaanm/rework-pr-1945Paul Phillips2013-01-313-13/+8
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-6968 Simple Tuple patterns aren't irrefutable
| * | | | | | | SI-6968 Simple Tuple patterns aren't irrefutableJason Zaugg2013-01-273-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reverts part of c82ecab. The parser can't assume that a pattern `(a, b)` will match, as results of `.isInstanceOf[Tuple2]` can't be statically known until after the typer. The reopens SI-1336, SI-5589 and SI-4574, in exchange for fixing this regression SI-6968. Keeping all of those fixed will require a better definition of irrefutability, and some acrobatics to ensure safe passage to the ambiguous trees through typechecking.
* | | | | | | | SI-6669 Add . to the default scalap classpathJames Iry2013-01-301-0/+26
| |_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default classpath for scalap did not include '.' which made it behave differently from javap in an annoying way. This commit adds it to the default. Also included is a test to make sure it's in the default but does not corrupt a user specified classpath.
* | | | | | | Merge pull request #2007 from retronym/backport/1021Adriaan Moors2013-01-302-0/+11
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | | [backport] Fix for SI-6154, VerifyError originating in uncurry.
| * | | | | | [backport] Fix for SI-6154, VerifyError originating in uncurry.Paul Phillips2013-01-292-0/+11
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Lhs still might be an Ident. Miguel did all the work, I just wrote it down in code form. (cherry picked from commit 48f8235822a2a100d6c4e8d3d7349df565ac6d40)
* / | | | | [backport] Disabled SI-6987.Paul Phillips2013-01-292-44/+0
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It causes spurious failures - a typical example: [partest] testing: [...]/files/run/t6987.scala [FAILED] [partest] did not get the string expected, full results were: [partest] Fast Scala compiler version 2.11.0-20130126-111937-f01e001c77 -- Copyright 2002-2013, LAMP/EPFL [partest] [Given arguments: -shutdown -verbose] [partest] [Transformed arguments: -shutdown -verbose -current-dir /localhome/jenkins/b/workspace/scala-checkin-manual] [partest] [VM arguments: ] [partest] java.net.ConnectException: Connection refused [partest] [Connecting to compilation daemon at port 32808 failed; re-trying...] [partest] [No compilation server running.] [partest] (cherry picked from commit 53d5df5c1d52b941732c243159de4f44456f03b4)
* | | | | Merge pull request #1927 from JamesIry/SI-6863_2.10.xJames Iry2013-01-281-0/+114
|\ \ \ \ \ | |/ / / / |/| | | | SI-6863 Fix verify error in captured var inited from block w try/catch
| * | | | SI-6863 Fix verify error in captured var inited from expr with try/catchJames Iry2013-01-251-0/+114
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a captured var was inited from a try/catch we did something reasonable. But if the var was inited from a more complicated expression (if/else, a block, match/case, etc) that ended with a try/catch then we didn't and we were generating faulty byte code. This fix patches LambdaLift to add the missing cases. For known simple expressions, the translation is just new *Ref(expr). For try/catch, if/else, match/case, and blocks this recursively walks down the internal result expressions to translate them. E.g. if(cond) trueExpr else falseExpr becomes if(cone) translate(trueExpr) else translate(falseExpr) For unknown expression types, the translation is {val temp = expr; new *Ref(expr) }
* | | | Merge pull request #1857 from retronym/ticket/6443-2.10.xAdriaan Moors2013-01-277-0/+82
|\ \ \ \ | | | | | | | | | | SI-6443 Widen dependent param types in uncurry
| * | | | SI-6443 Expand test coverage with varargs, by-name.Jason Zaugg2013-01-164-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were already working, due to a serendipitous ordering of transformations. The tests will keep it this way.
| * | | | SI-6443 Widen dependent param types in uncurryJason Zaugg2013-01-163-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bridge building operates on unusual method signatures: after uncurry, so parameter lists are collapsed; but before erasure, so dependently typed parameters are still around. Original: def foo(a: T)(b: a.type, c: a.U): Unit During computeBridges: (a: T, b: a.type, c: a.U)Unit This signature no longer appears to override the corresponding one in a superclass, because the types of `b` and `c` are dependent on method parameters. The root of the problem is uncurry, which leaves the trees in a poor state. This commit changes uncurry to remedy this. An example illustrates it best: // source def foo(a: A)(b: a.type): b.type = b // post uncurry before this patch. // not well typed code! def foo(a: A, b: a.type): a.type = { // post uncurry after this patch def foo(a: A, b: A): A = { val b$1 = b.asInstanceOf[a.type] b$1 }
* | | | | Update a checkfile from a recent fix.Jason Zaugg2013-01-271-1/+1
| |/ / / |/| | | | | | | | | | | | | | | | | | | The build is currently broken: https://scala-webapps.epfl.ch/jenkins/view/2.10.x/job/scala-nightly-main-2.10.x/
* | | | Merge pull request #1951 from JamesIry/SI-6987_2.10.xPaul Phillips2013-01-252-0/+44
|\ \ \ \ | | | | | | | | | | SI-6987 Fixes fsc compile server verbose output
| * | | | SI-6987 Tests fsc verbose outputJames Iry2013-01-222-0/+44
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit includes a test of fsc's verbose output. In order for it to work, CompileServer's main method had to be modified to remove a sys exit 0 at the end. It was redundant and made testing a bit harder. In order to prevent a race condition between server and client start up, this commit also adds a server callback that decrements a CountDownLatch that the main testing thread waits for. Finally, the server had to be modified to use Console.withErr and Console.withOut instead of mutating the global System.err and System.out variables. Otherwise the test would be unreliable.
* | | | Merge pull request #1928 from retronym/ticket/6902Paul Phillips2013-01-251-0/+13
|\ \ \ \ | | | | | | | | | | SI-6902 Check unreachability under @unchecked
| * | | | SI-6902 Check unreachability under @uncheckedJason Zaugg2013-01-191-0/+13
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only exhaustiveness checking should be disabled if the scrutinee of a match as annotated as `: @unchecked`. This was the pre-2.10.x behaviour. This also fixes a variation of the closed ticket, SI-6011. The exhaustiveness check is needed to safely fallback from emitting a table switch if duplicate cases are detected.
* | | | SI-6969, mishandling of SoftReferences in method cache.Paul Phillips2013-01-242-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More interesting to test than it was to fix. The soft reference is now dereferenced once, the locally stored underlying value ascertained to be non-null, and the remainder of the references to the value use the local var. The enclosed test reliably NPEs without this patch.
* | | | Merge pull request #1952 from retronym/backport/1599Paul Phillips2013-01-242-0/+9
|\ \ \ \ | | | | | | | | | | [backport] Fix SI-6637 (misoptimization in erasure)
| * | | | [backport] Fix SI-6637 (misoptimization in erasure)Jason Zaugg2013-01-232-0/+9
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit f9ef5300ab561628e53c654df9000c75f488d74a Author: Jan Niehusmann <jan@gondor.com> Date: Fri Nov 9 15:05:58 2012 +0100 Fix SI-6637 (misoptimization in erasure) Move the optimization one level deeper so the expression being tested with isInstanceOf is always evaluated. (cherry picked from commit b540aaee4ba30e2dd980456a44e8c6d732222df1)
* | | | Merge pull request #1953 from retronym/backport/1586Paul Phillips2013-01-241-0/+61
|\ \ \ \ | | | | | | | | | | [backport] Fix unsafe array opt. / opt. primitive Array(...)