summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2240 from paulp/pr/warn-forward-referencePaul Phillips2013-03-121-0/+35
|\ | | | | Warn about locally identifiable init order issues.
| * Warn about locally identifiable init order issues.Paul Phillips2013-03-121-0/+35
| | | | | | | | | | | | | | | | | | | | This warns about a subset of initialization order issues which can easily be identified by inspection, such as val x = y val y = 5 The likelihood of this formulation being intentional is miniscule.
* | update eclipse projects (partest, repl & scaladoc)Adriaan Moors2013-03-124-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we've removed scala.annotations.serializable in 2.11, you'll need to following bandaid to use eclipse on master. This is the easiest fix, but certainly not recommended in general. ``` --- i/src/eclipse/scala-library/.classpath +++ w/src/eclipse/scala-library/.classpath @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="library"/> - <classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/> + <classpathentry exported="true" kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/> ``` This corresponds to checking the export check box for the scala library jar in the library's build path.
* | Merge pull request #2238 from adriaanm/pr-2206-rebasedAdriaan Moors2013-03-129-44/+265
|\ \ | |/ |/| [rebase of #2206] l JSR-223 compliance for the interpreter
| * SI-874 actual JSR-223 implementationRaphael Jolly2013-03-116-29/+175
| |
| * SI-874 reflect.io improvementsRaphael Jolly2013-03-113-15/+90
| |
* | Merge pull request #2231 from retronym/topic/ide-configAdriaan Moors2013-03-119-0/+190
|\ \ | | | | | | Topic/ide config
| * | Add eclipse projects for interactive, scaladoc.Jason Zaugg2013-03-104-0/+89
| | |
| * | IntellIiJ module definitions for scaladoc, interactive and continuations-*.Jason Zaugg2013-03-105-0/+101
| | |
* | | Merge pull request #2237 from som-snytt/topic/slurpeeAdriaan Moors2013-03-111-1/+4
|\ \ \ | |_|/ |/| | Close after slurping (fixes SI-7244)
| * | Close after slurping (fixes SI-7244)Som Snytt2013-03-111-1/+4
| |/ | | | | | | | | | | | | | | Since slurp by definition is the noise made by the straw when the cup is empty and all milk shake is consumed, we can safely close after slurping. Use case was deleting a test artifact on Windows.
* | Merge pull request #2229 from srinivasreddy/masterAdriaan Moors2013-03-111-1/+1
|\ \ | | | | | | A small typo corrected
| * | a typo correctedsrinivasreddy2013-03-101-1/+1
| | |
* | | Modularized the repl.Paul Phillips2013-03-1159-807/+788
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following in the footsteps of scaladoc and interactive. The interpreter sources move into src/repl, and are given a separate build target. As with the others, at present they are still packaged into scala-compiler.jar. A summary of changes: - repl requires use of ReplGlobal (this was already implied) - macro code's repl-specific classloader hack pulled into overridable method and overridden in ReplGlobal - removed -Ygen-javap option to eliminate backend's dependency on javap - removed -Yrepl-debug option (can still be enabled with -Dscala.repl.debug) - pushed javap code into src/repl so javax.tools dependency can bee weakened to the repl only - removed some "show pickled" related code which hasn't worked right in a while and isn't the right way to do it anymore anyway. Will return to fix showPickled and provide it with some tests.
* | Merge pull request #2201 from retronym/topic/types-break-down-squashAdriaan Moors2013-03-107-2649/+2732
|\ \ | | | | | | Carve up Types.scala
| * | Carve up Types.scalaJason Zaugg2013-03-057-2649/+2732
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Step one of a plan to bring some order and thread safety to this neck of the woods. More info: https://gist.github.com/retronym/5081754 https://groups.google.com/forum/?fromgroups=#!topic/scala-internals/MOvmcnbyb_g Note that the sub package is named 'tpe' and not 'Types' to avoid potential problems on case insensitive file systems, given the existing trait 'Types.'
* | | Deprecated custom ant task 'Same'.Paul Phillips2013-03-092-3/+1
| | |
* | | Eliminated all forInteractive/forScaladoc uses.Paul Phillips2013-03-0910-93/+60
| | | | | | | | | | | | | | | | | | | | | | | | This is the commit which brings it all together. The booleans forInteractive and forScaladoc are now deprecated and are not inspected for any purpose. All behavioral changes formerly accomplished via tests of those flags are embodied in the globals built specifically for those tasks.
* | | Moved interactive code into src/interactive.Paul Phillips2013-03-092-3/+116
| | | | | | | | | | | | | | | As with scaladoc, pushes presentation compiler specific code into its separate source area.
* | | Moved scaladoc code into src/scaladoc.Paul Phillips2013-03-098-223/+331
| | | | | | | | | | | | | | | | | | This leverages the preceding several commits to push scaladoc specific code into src/scaladoc. It also renders some scanner code more comprehensible.
* | | Teach partest the magic of abstraction.Paul Phillips2013-03-093-34/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some new partest abilities which were necessary to deal with additional standard jars. These new abilities aren't yet put to the test because scaladoc and interactive are still going into the compiler jar. No longer need each jar or classes directory be named directly for partest to find them.
* | | Moved interactive sources into separate directory.Paul Phillips2013-03-0924-0/+0
| | | | | | | | | | | | | | | As with the preceding commit, this has build-internal effects only.
* | | Moved scaladoc sources into separate directory.Paul Phillips2013-03-09118-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | This change is not externally visible. It moves the scaladoc sources into src/scaladoc and adds an ant target for building them. The compilation products are still packaged into scala-compiler.jar as before, but with a small change to build.xml a separate jar can be created instead.
* | | Enabling commit for interactive/scaladoc modules.Paul Phillips2013-03-0914-97/+111
| |/ |/| | | | | | | | | This is a non-behaviorally-changing setup commit which re-routes bits of code through avenues which can more easily be influenced by subclasses of Global.
* | Merge pull request #2216 from JamesIry/master_7231James Iry2013-03-081-1/+1
|\ \ | | | | | | SI-7231 Fix assertion when adapting Null type to Array type
| * | SI-7231 Fix assertion when adapting Null type to Array typeJames Iry2013-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | GenICode was doing a sanity check when adapting an expression of type Null to something else. It was just doing the wrong one. Instead of checking whether the result expression type was a reference type it was checking to see if it was an class reference type. This commit fixes that and adds a test to make sure both forms of adaptation work as expected.
* | | Merge pull request #2185 from JamesIry/master_unreachableGrzegorz Kossakowski2013-03-084-39/+123
|\ \ \ | |/ / |/| | SI-7006 Prevent unreachable blocks in GenICode
| * | SI-7006 Cleanup from code reviewJames Iry2013-03-071-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Minor cleanup from review of https://github.com/scala/scala/pull/2185 * Changed several instances of |= to ||= for better clarity (and bonus savings!) * Documented the return of two methods that compute the reachability of follow-on blocks.
| * | SI-7006 Prevent unreachable blocks in GenICodeJames Iry2013-03-064-39/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes GenICode prevent the generation of most unreachable blocks. The new unreachable block prevention code can be disabled with a compiler flag. Because full unreachable analysis is no longer necessary for normal code it makes the unreachable block analysis run only under -optimise. A test is included to make sure unreachable code doesn't cause issues in code gen. A concrete example will help. def foo(): X = { try return something() catch { case e: Throwable => println(e) throw e } unreachableCode() ] Here unreachableCode() is unreachable but GenICode would create ICode for it and then ASM would turn it into a pile of NOPS. A previous commit added a reachability analysis step to eliminate that unreachable code but that added a bit of time to the compilation process even when optimization was turned off. This commit avoids generating most unreachable ICode in the first place so that full reachability analysis is only needed after doing other optimization work. The new code works by extending a mechanism that was already in place. When GenICode encountered a THROW or RETURN it would put the current block into "ignore" mode so that no further instructions would be written into the block. However, that ignore mode flag was itself ignored when it came to figuring out if follow on blocks should be written. So this commit goes through places like try/catch and if/else and uses the ignore mode of the current block to decide whether to create follow on blocks, or if it already has, to kill by putting them into ignore mode and closing them where they'll be removed from the method's list of active blocks. It's not quite as good as full reachability analysis. In particular because a label def can be emitted before anything that jumps to it, this simple logic is forced to leave label defs alone and that means some of them may be unreachable without being removed. However, in practice it gets close the the benefit of reachability analysis at very nearly no cost.
* | | Merge pull request #2204 from adriaanm/merge-2.10.xPaul Phillips2013-03-0620-427/+488
|\ \ \ | |/ / |/| | Merge 2.10.x into master
| * | Merge 2.10.x into master.Adriaan Moors2013-03-057-107/+117
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resurrect some undead code from 373ded2ad3 (tuple2Pickler). Conflicts: src/compiler/scala/tools/nsc/interactive/CompilerControl.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala
| | * \ Merge pull request #2199 from retronym/ticket/7214Adriaan Moors2013-03-051-1/+3
| | |\ \ | | | | | | | | | | SI-7214 outer check based on dealiased pattern type.
| | * \ \ Merge pull request #2156 from vigdorchik/hierarchyAdriaan Moors2013-03-055-61/+65
| | |\ \ \ | | | | | | | | | | | | SI-7109 SI-7153 Generalize the API to get docComments: allow to force do...
| | | * | | SI-7109 SI-7153 Generalize the API to get docComments: allow to force docTreesEugene Vigdorchik2013-02-245-61/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for given fragments. Don't type-check when forcing doc comments, but rather do it directly. Test the new functionality as well as better tests for the old one.
| * | | | | Merge 2.10.x into master.Adriaan Moors2013-03-056-283/+305
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/transform/patmat/Logic.scala
| | * | | | Merge pull request #2193 from adriaanm/patmat-refactorAdriaan Moors2013-03-0510-307/+353
| | |\ \ \ \ | | | | | | | | | | | | | | merge 2.10.1 into 2.10.x
| | | * \ \ \ Merge 2.10.1 into 2.10.xAdriaan Moors2013-03-032-7/+21
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix for SI-7183 in 440bf0a8c2 was forward ported in f73d50f46c. Conflicts: src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
| | | | * | | | [nomaster] SI-7195 minor version mustn't introduce warningsAdriaan Moors2013-03-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want 2.10.1 to be a drop-in replacement for 2.10.0, so we can't start warning where we weren't warning in 2.10.0. See SI-5954 (#1882, #2079) for when it was an implementation restriction, which was then weakened to a warning. It's now hidden behind -Ydebug.
| | | | * | | | Merge pull request #2168 from retronym/ticket/7183Adriaan Moors2013-03-011-14/+28
| | | | |\ \ \ \ | | | | | | | | | | | | | | | | | | SI-7183 Disable unreachability for withFilter matches.
| | | | | * | | | SI-7183 Disable unreachability for withFilter matches.Jason Zaugg2013-02-251-14/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids spurious unreachable warnings on code that the user didn't write. The parser desugars for-comprehensions such as: for (A(a) <- List(new A)) yield a To: List(new A()).withFilter(((check$ifrefutable$2) => check$ifrefutable$2: @scala.unhecked match { case A((a @ _)) => true case _ => false }) ) But, if `A.unapply` returns `Some[_]`, the last case is dead code. (Matching against a regular case class *would* fall through in the caes of a null scrutinee.) In SI-6902, we enabled unreachability warnings, even if the scrutinee was annotated as @unchecked. That was consistent with the 2.9.2 behaviour, it was only disabled temporarily (actually, accidentally) in 2.10.0. But, the old pattern matcher didn't warn about this code. This commit makes the pattern matcher recognise the special scrutinee based on its name and disables both exhaustivity *and* unreachability analysis. To do so, the we generalize the boolean flag `unchecked` to the class `Suppression`.
| | | * | | | | | [port] SI-7183 Disable unreachability for withFilter matches.Adriaan Moors2013-03-033-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a forward port of #2168 (originally for 2.10.1, but the pattern matcher has since been refactored in 2.10.x.)
| | | * | | | | | better names for components of MatchTranslatorAdriaan Moors2013-03-033-34/+33
| | | | | | | | |
| | | * | | | | | move sat solving to separate fileAdriaan Moors2013-03-033-233/+243
| | | | | | | | |
| * | | | | | | | Merge 2.10.x into master.Adriaan Moors2013-03-051-10/+13
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/library/scala/collection/mutable/ArrayOps.scala
| | * | | | | | | Merge pull request #2198 from retronym/ticket/7215Paul Phillips2013-03-051-10/+13
| | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | SI-7215 Fix transpose of an empty Array[Array[T]].
| | | * | | | | | | SI-7215 Fix transpose of an empty Array[Array[T]].Jason Zaugg2013-03-051-10/+13
| | | | | | | | | |
| | * | | | | | | | Merge pull request #2175 from retronym/ticket/7185Paul Phillips2013-03-051-1/+2
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | SI-7185 Avoid NPE in TreeInfo.isExprSafeToInline
| * | | | | | | | | | Merge 2.10.x into master.Adriaan Moors2013-03-051-0/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/transform/Erasure.scala
| | * | | | | | | | | Merge pull request #2178 from scalamacros/ticket/7190Paul Phillips2013-03-051-0/+1
| | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | SI-7190 macros no longer give rise to bridges
| | | * | | | | | | | | SI-7190 macros no longer give rise to bridgesEugene Burmako2013-02-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amazingly enough, this got through all the testing we performed. But now erasure knows that it shouldn't generate bridges for macro methods.