summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2406 from paulp/issue/7362Paul Phillips2013-04-3015-690/+764
|\ | | | | SI-7362, crash in presentation compiler
| * More useful checkfile output in interactive tests.Paul Phillips2013-04-3012-698/+698
| | | | | | | | | | | | I resisted the urge to fix "aksTypeCompletion" for as long as I possibly could. While I was there I threw in what seem to be like significant output improvements, but you tell me.
| * SI-7362, crash in presentation compiler.Paul Phillips2013-04-304-13/+87
| | | | | | | | Code by retronym, test by huitseeker, I just move stuff around.
* | Merge pull request #2476 from paulp/pr/2446-passingPaul Phillips2013-04-3035-422/+808
|\ \ | | | | | | Partest PR up to the passing commit.
| * | SI-7409 Par-Test: A crash is not a DNC for neg testsSom Snytt2013-04-303-31/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A compiler crash does not count as Does Not Compile for purposes of a negative test. Changing the test kind from "neg" to "dnc" is out of scope for this PR. Even if the user asks to update the check file with the crash result, we must prevent him from doing so. Any further attempts to update the check file with a crash will dispatch the Scala SWAT squad which will race to his location and physically restrain the user. Only Martin holds the code which will allow the squad to stand down. So make sure his cell is on next time you want to --update-check. A neg test will stop trying to compile after the first failed round, which is all that matters. By popular request, a new test outcome is emitted when the check file is updated. It is called "Updated". It even has its own short status, the double-plus that is reminiscent of diff output.
| * | Partest has an optionable wait period.Som Snytt2013-04-305-13/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partest --timeout "30 seconds" to time out the test run. It will not hang on timeout ("I hang with Par-Test" t-shirts not-withstanding). It's beyond the scope of this commit to investigate argument parsing: `partest --timeout "\"30 seconds"\" --pos`
| * | SI-7349 Partest supports test-interfaceSom Snytt2013-04-3014-265/+263
| | | | | | | | | | | | | | | | | | | | | | | | Partest uses test-interface API to invoke ScalaCheck. This obviates ad hoc output checking for result status. The context class loader is set to a loader that the scaladoc scalacheck tests can use.
| * | Update ScalaCheck to 1.10.1.Som Snytt2013-04-3016-124/+446
| | | | | | | | | | | | Puts test-interface on the class path.
| * | Partest testnum field width is sensitive to total testsSom Snytt2013-04-302-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the hyphens to line up on a column within the output for a test category or "kind". ``` $ partest files/neg/t4134.scala --run Selected 1348 tests drawn from 1 named test categories, specified tests & starting 1 test in neg ok 1 - neg/t4134.scala & starting 1347 tests in run ok 1 - run/absoverride.scala ok 2 - run/amp.scala ok 3 - run/adding-growing-set.scala ```
| * | SI-7358 Partest fails on scalacheck failureSom Snytt2013-04-301-14/+18
| |/ | | | | | | | | | | A failing test generates a test failure. The failure log is added to the transcript. The log stream is closed when done.
* | Merge pull request #2453 from magarciaEPFL/backendish6Paul Phillips2013-04-301-13/+18
|\ \ | |/ |/| SI-7422 GenASM populates and clears its maps within a Run
| * no need to manually clear perRunCaches in GenASMMiguel Garcia2013-04-271-3/+0
| |
| * maps in GenASM guaranteed mem-leak-free by perRunCachesMiguel Garcia2013-04-261-2/+2
| |
| * SI-7422 GenASM populates and clears its maps within a RunMiguel Garcia2013-04-261-11/+19
| |
* | Merge pull request #2428 from hubertp/issue/7291Paul Phillips2013-04-3010-117/+165
|\ \ | | | | | | SI-7291: Don't throw exceptions while encountering diverging expansion.
| * | SI-7291: Remove error kinds.Hubert Plociniczak2013-04-264-46/+54
| | | | | | | | | | | | | | | | | | | | | | | | What seemed like a good idea initially (since potentially there were many different kinds of errors that could be treated specially), started to complicate the error logic. So let's just match on the specific instance of an error to manipulate the buffer.
| * | SI-7291: No exception throwing for diverging implicit expansionHubert Plociniczak2013-04-269-76/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we don't throw exceptions for normal errors it was a bit odd that we don't do that for DivergingImplicit. As SI-7291 shows, the logic behind catching/throwing exception was broken for divergence. Instead of patching it, I rewrote the mechanism so that we now another SearchFailure type related to diverging expansion, similar to ambiguous implicit scenario. The logic to prevent diverging expansion from stopping the search had to be slightly adapted but works as usual. The upside is that we don't have to catch diverging implicit for example in the presentation compiler which was again showing that something was utterly broken with the exception approach.
* | | Merge pull request #2459 from magarciaEPFL/backendish7Paul Phillips2013-04-303-28/+74
|\ \ \ | | | | | | | | similar in purpose to -Ygen-javap but with some advantages: -Ygen-asmp
| * | | BytecodeWriters.BytecodeWriter doesn't need to fiddle with SymbolMiguel Garcia2013-04-272-20/+26
| | | | | | | | | | | | | | | | This commit allows a BytecodeWriter to focus on File, Paths, and streams. GenASM now does the conversion from Symbol to File.
| * | | compiler flag -Ygen-asmp to emit .asmp textual files for bytecodeMiguel Garcia2013-04-273-10/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the -Ygen-asmp compiler flag, similar in purpose to what -Ygen-javap used to be. The ASM-based counterpart to javap is useful even in those cases where javap is available, as it produces for example readable (textual) output for pickles. Additionally, javap displays quite differently two constant pools that have identical contents (javap shows their physical layout, not just the information the entries hold). Finally, stack maps (classfile version 50 and up) are displayed in encoded form by javap, their expansion by ASM is more readable.
* | | | Merge pull request #2469 from paulp/pr/explaintypesPaul Phillips2013-04-295-5/+10
|\ \ \ \ | | | | | | | | | | Route -explaintypes through reporter.
| * | | | Route -explaintypes through reporter.Paul Phillips2013-04-295-5/+10
|/ / / / | | | | | | | | | | | | | | | | | | | | Sick of seeing Console printlns during partest runs. You should not print anything to Console.{out,err} if it's ever going to happen outside developerland.
* | | | Merge pull request #2463 from retronym/ticket/7429Paul Phillips2013-04-291-21/+13
|\ \ \ \ | | | | | | | | | | SI-7429 Fix checkinit build failure in Contexts
| * | | | SI-7429 Fix checkinit build failure in ContextsJason Zaugg2013-04-281-21/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent refactoring in Contexts resulted in an uninitialized field access. This wasn't deadly, as it was already compensating for this by expecting a null value for `outer` during in the body of the constructor of Contexts when extended by NoContext. This commit reworks that code a little to avoid dereferencing the overriden `outer` field. A similar mistake in `ImportContext` is also corrected.
* | | | | Merge pull request #2465 from retronym/ticket/6784Paul Phillips2013-04-298-6/+15
|\ \ \ \ \ | | | | | | | | | | | | SI-6784 Localize features imports in scala.swing
| * | | | | Address a deprecation warnings in scala-swing.Jason Zaugg2013-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | While I was in the neighbourhood.
| * | | | | SI-6784 Localize feature imports in scala.swing.Jason Zaugg2013-04-287-5/+14
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were inadvertantly added to the public API in f15dc74 for anyone importing scala.swing._, which unintentionally enabled reflectiveCalls and implicitConversions for clients of the API. This change breaks the source compatibiliy poilicy, rather than deprecating these, based on the extremely low chance that someone is using these in something like: import scala.swing._; println(implicitConversions)
* | | | | Merge pull request #2443 from paulp/pr/jlineAdriaan Moors2013-04-296-13/+13
|\ \ \ \ \ | |/ / / / |/| | | | Updated jline and rebuilt.
| * | | | Updated jline and rebuilt.Paul Phillips2013-04-246-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Two years of atrophy. Now using sbt 0.12.3 and latest versions of jansi, etc.
* | | | | Merge pull request #2421 from paulp/pr/print-method-positionsPaul Phillips2013-04-274-12/+131
|\ \ \ \ \ | |_|/ / / |/| | | | -Yshow-member-pos, print the positions of members.
| * | | | -Yshow-member-pos, print the positions of members.Paul Phillips2013-04-204-12/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here for instance is a command line which leverages the output of this option to print the method bodies of all methods called 'transformInfo' found under src. Given 1500 source files it accomplishes this in four seconds, thanks to -Ystop-after:parser. % scalac -Yshow-member-pos sed -Ystop-after:parser \ $(find src/compiler -name '*.scala') | \ grep transformInfo | sed 's/ # .*//;' | \ while read line; do echo "// $line" && gsed -n $line && echo; done Or more simply, the start/end lines of each member of Random: % scalac -Yshow-member-pos "" ./src/library/scala/util/Random.scala ./src/library/scala/util/Random.scala 20,134 class Random 33 def nextBoolean 38 def nextBytes 43 def nextDouble 48 def nextFloat 54 def nextGaussian 59 def nextInt 65 def nextInt 70 def nextLong 81,89 def nextString 82,86 def safeChar 83 val surrogateStart 84 val res 94,98 def nextPrintableChar [snip] It makes me sad I'm always in the position of having to hack the compiler to do this sort of thing. All we need is something like -Yinsert-phase:Foo where Foo is a class implementing a (Phase, Tree) => Tree method, and the compiler runs all the unit.bodies through it after each phase, and then one could easily accomplish this in the privacy of one's own compiler.
* | | | | Merge pull request #2457 from paulp/pr/late-method-reduxJason Zaugg2013-04-267-15/+51
|\ \ \ \ \ | | | | | | | | | | | | Documented lateMETHOD flag.
| * | | | | Documented lateMETHOD flag.Paul Phillips2013-04-267-14/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A baby step toward its eventual elimination. WANTED, DEAD OR ALIVE For Heinous Crimes Against Efficiency and Scrutability lateDEFERRED lateFINAL lateINTERFACE lateMODULE notPROTECTED notPRIVATE notOVERRIDE lateMETHOD ON THE RUN lateMETHOD
| * | | | | Call method rather than duplicating method.Paul Phillips2013-04-261-1/+1
| | | | | |
* | | | | | Merge pull request #2445 from magarciaEPFL/backendish3Paul Phillips2013-04-262-109/+101
|\ \ \ \ \ \ | | | | | | | | | | | | | | improvements, constructors phase (2nd attempt)
| * | | | | | deprecation cycle for definitions.NPEConstructorMiguel Garcia2013-04-271-0/+3
| | | | | | |
| * | | | | | improved naming of variables in constructors phaseMiguel Garcia2013-04-251-17/+10
| | | | | | |
| * | | | | | translation for DelayedInit keeps more code in original classMiguel Garcia2013-04-241-101/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As before, the translation for DelayedInit creates a closure-class. With this commit, its apply() method now just delegates to a synthetic method (in the original class) that contains the statements whose execution is to be delayed. Previously the closure body would have the statements in question transplanted into it, so to say, which in turn required creating accessors in the original class, as well as reformulating accesses-on-this into accesses-via-outer. Details about the mechanics of the rewriting can be found in the source comment for delayedEndpointDef()
| * | | | | | avoids multiple evals of isSubClass DelayedInitClassMiguel Garcia2013-04-241-3/+5
| | | | | | |
| * | | | | | for null outer pointer, NPE via throw nullMiguel Garcia2013-04-242-2/+2
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per the JVM spec, the athrow instruction throws a NullPointerException upon finding null on stack top. This commit takes advantage of that feature, to emit more compact code. The constructor of an inner class that receives an outer value first checks that value for nullness, depending on which NPE may be thrown. The code now emitted to achieve the above looks like: 0: aload_1 1: ifnonnull 6 4: aconst_null 5: athrow 6: ...
* | | | | | Merge pull request #2447 from paulp/pr/bynamePaul Phillips2013-04-263-12/+9
|\ \ \ \ \ \ | | | | | | | | | | | | | | Created utility function for dropping by-name-ness.
| * | | | | | Created utility function for dropping by-name-ness.Paul Phillips2013-04-253-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | And applied it in three locations.
* | | | | | | Merge pull request #2452 from magarciaEPFL/backendish5Paul Phillips2013-04-263-24/+16
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | cleanup of old stuff from the GenJVM era
| * | | | | | role played by magic constant in ScalaSigBytesMiguel Garcia2013-04-261-0/+10
| | | | | | |
| * | | | | | another GenJVM remnant that goes awayMiguel Garcia2013-04-251-15/+0
| | | | | | |
| * | | | | | removing remnants from the GenJVM eraMiguel Garcia2013-04-252-9/+5
| | | | | | |
| * | | | | | static methods may have local variables too, some dayMiguel Garcia2013-04-251-0/+1
| | | | | | |
* | | | | | | Merge pull request #2450 from huitseeker/issue/SI-7421Paul Phillips2013-04-261-5/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-7421 remove unneeded extra-attachement in maven deploy
| * | | | | | | SI-7421 remove unneeded extra-attachement in maven deployFrançois Garillot2013-04-251-5/+1
| | | | | | | |
* | | | | | | | Merge pull request #2442 from soc/SI-7403Paul Phillips2013-04-262-5/+7
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-7403 Stream extends Serializable