summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Centrally unify module class representations.Paul Phillips2013-04-051-2/+7
| | | | | | | | | | | | | | | There are these two representations of a type we wish to treat as the same: TypeRef(pre, sym1, Nil) // sym1.isModuleClass, sym1.sourceModule == sym2 SingleType(pre, sym2) // sym2.isModule, sym2.moduleClass == sym1 I rolled the recognition of this into normalizePlus where it won't bother anyone. normalizePlus is the last effort undertaken by isSameType before it gives up. This allowed significant simplification of logic elsewhere, since there is a great deal of logic working around the fact that a TypeRef might be equivalent to a SingleType even after dealiasing.
* Optimization/logic improvement in Scopes.Paul Phillips2013-04-051-4/+44
| | | | | | | | | I rescued "isSubScope" from the innards of isSameType and placed it on Scope. To write a more efficient "isSameScope", I needed a size method which wasn't O(n). I now cache the size whenever the elemsCache is regenerated.
* Merge pull request #2353 from adriaanm/cooler-couleurs-re3Adriaan Moors2013-04-0470-1597/+1545
|\ | | | | Cooler couleurs take 3
| * SI-6289 Paulptest demonstrating javac errorsSom Snytt2013-04-045-3/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is Paul's test demonstrating that Javac errors are correctly transcribed in the test transcript. A gratuitous Scala class is added to a later round to show that the test halts after the first error. The runner must supply absolute paths to javac so that absolute paths are reported in errors and stripped away by partest. The check file is differentiated for Java 6 and 7, and partest's runner will now post-process the `diff log check` to strip the diff which does not apply.
| * SI-6289 Partest in technicolor and showing javac errorsSom Snytt2013-04-0466-1597/+1480
|/ | | | | | | | | | | | | | | | | | | | | | Paulptest includes color and simplified test scarfing. Scalap tests are moved to the conventional name and location. Testicolor missed out on Josh Suereth's tweak to sort the files in a compilation round. Restore sortiness to test sources. Testicolor is due to one of Paul's branches on a timeline that apparently did not include the destruction of planet Earth and its colonies by the Xindi. Thanks also to Szabolcs Berecz for his merge effort. Merging is thankless work, but not as thankless as merging in a timeline that actually does terminate in the destruction of your home world and Enterprise. Archer had a supremely difficult choice: rescue humanity or live out his retirement with T'Pol waiting on him hand and foot? I'm sure I don't know how I'd choose.
* Merge pull request #2347 from adriaanm/merge-2.10.xAdriaan Moors2013-04-042-104/+151
|\ | | | | Merge 2.10.x: #2346 edition
| * Merge 2.10.x into master again (no conflicts).Adriaan Moors2013-04-021-5/+13
| |\
| | * comments to address reviewer feedbackAdriaan Moors2013-04-021-5/+13
| | |
| * | Merge 2.10.x into masterAdriaan Moors2013-04-022-104/+143
| |\| | | | | | | | | | | | | Conflicts: build.xml
| | * formattingAdriaan Moors2013-04-021-13/+13
| | |
| | * Preliminary support for zinc.Adriaan Moors2013-04-021-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To use Zinc with the ant build: - install zinc and symlink the installed zinc script to ${basedir}/tools/zinc (${basedir} is where build.xml and the rest of your checkout resides) - make sure to set ZINC_OPTS to match ANT_OPTS! - invoke ant as `ant -Dstarr.version="2.10.1" -Dlocker.skip=1` (zinc does not work if locker is only classfiles, needs jars TODO rework the build to pack locker and build using that when using zinc?) Mostly to enable dog fooding of incremental compilation work for now.
| | * Regularity for build.xml: 1 output dir / projectAdriaan Moors2013-04-021-90/+89
| | | | | | | | | | | | | | | | | | | | | Untangle actors, msil builds from library/compiler builds. For further regularity, always build java files. TODO: update IDE projects
| | * get rid of args element in staged-scalacAdriaan Moors2013-04-011-18/+10
| | |
* | | Merge pull request #2320 from mighdoll/masterPaul Phillips2013-04-031-1/+1
|\ \ \ | | | | | | | | doc for Types.baseClasses has Linearization definition reversed from spec 5.1.2
| * | | doc fix for Types.baseClasses to match spec definition of Linearization 5.1.2Lee Mighdoll2013-03-261-1/+1
| | | |
* | | | Merge pull request #2337 from retronym/ticket/7110-2Paul Phillips2013-04-034-0/+20
|\ \ \ \ | | | | | | | | | | SI-7110 Warn about naked try without catch/finally
| * | | | SI-7110 Warn about naked try without catch/finallyJason Zaugg2013-03-294-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, this was allowed: scala> try ( 1 / 0 ) java.lang.ArithmeticException: / by zero But since the advent of util.Try, the subtle difference to the following seems dangerous: scala> import util.Try import util.Try scala> Try ( 1 / 0 ) res4: scala.util.Try[Int] = Failure(java.lang.ArithmeticException: / by zero) Discussion: https://groups.google.com/d/topic/scala-language/fy2vXD_3fF8/discussion There was some concern that this curtails a handy, temporary way to remove the exception handlers from some code. But after thinking about this, I contend that: a) those people can easily stomach the warning temporarily (modulo, of course, those with -Xfatal-warnings.) b) putting this warning behind Xlint will disable it for those who need it most: beginners. I also chose not to refer to 'scala.util.Try' in the error message as I think that has as much potential to confuse as it does to clarify.
* | | | | Merge pull request #2341 from paulp/pr/java-acc-flagsPaul Phillips2013-04-038-494/+592
|\ \ \ \ \ | | | | | | | | | | | | ClassfileParser work.
| * | | | | Add () to side-effecting u1/u2/u4.Paul Phillips2013-04-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | On good advice of reviewer.
| * | | | | Reduce duplication in JavaMirrors.Paul Phillips2013-04-032-111/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applying some of the abstractions from the prior commits, though I would like to emphasize that such infrastructure was not a prerequisite for de-duplicating this file.
| * | | | | Brought some structure to the classfileparser.Paul Phillips2013-04-033-366/+356
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I run out of ways to describe this sort of work: removes code which does too much, too verbosely and too explicitly, using too much indirection and too much duplication. Replace it with code which offers less of these things.
| * | | | | Cleaning up error handling.Paul Phillips2013-04-031-13/+6
| | | | | |
| * | | | | Fleshing out comments on JavaAccFlags.Paul Phillips2013-04-031-9/+6
| | | | | |
| * | | | | Abstract over java.lang.reflect.{ Method, Constructor }.Paul Phillips2013-04-031-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No doubt there's some plausible explanation for this design: % java/lang/reflect/Method.java public Annotation[][] getParameterAnnotations() public Class<?>[] getExceptionTypes() public Class<?>[] getParameterTypes() public Type[] getGenericExceptionTypes() public Type[] getGenericParameterTypes() public boolean isVarArgs() % java/lang/reflect/Constructor.java public Annotation[][] getParameterAnnotations() public Class<?>[] getExceptionTypes() public Class<?>[] getParameterTypes() public Type[] getGenericExceptionTypes() public Type[] getGenericParameterTypes() public boolean isVarArgs() Sun must have really been losing their grip there as the end approached. This class fakes some of the missing common parent.
| * | | | | Value class to represent jvm flags.Paul Phillips2013-04-031-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That clenching you feel in your gut when you watch the Ints hurtling in all directions is your signal that a little type safety is good for the soul. With this value class it is now somewhat harder to confuse java bits with scala bits, although not nearly hard enough.
| * | | | | Added ensureAccessible to reflection library.Paul Phillips2013-04-032-7/+15
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method comes up with some frequency and there are a lot of ways to write it either unsafely (failing to catch a likely exception) or with inadequate generality (as was done in the pre-existing version of this method in ScalaRunTime) so I thought it warranted a place in the standard library.
* | | | | Merge pull request #2348 from paulp/pr/2324-editPaul Phillips2013-04-021-3/+1
|\ \ \ \ \ | | | | | | | | | | | | SI-7237 Always choose ForkJoinTaskSupport
| * | | | | SI-7237 Always choose ForkJoinTaskSupportSimon Ochsenreither2013-04-021-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ForkJoinTaskSupport works on Hotspot, Avian and J9, while ThreadPoolTaskSupport causes the test test/files/scalacheck/parallel-collections to reliably hang on all three.
* | | | | | Merge pull request #2327 from paulp/pr/2315-rebasedPaul Phillips2013-04-0295-244/+251
|\ \ \ \ \ \ | |/ / / / / |/| | | | | SI-7261 Implicit conversion of BooleanSetting to Boolean and BooleanFlag
| * | | | | SI-7261 Implicit conversion of BooleanSetting to Boolean and BooleanFlagSom Snytt2013-03-2793-244/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit shortens expressions of the form `if (settings.debug.value)` to `if (settings.debug)` for various settings. Rarely, the setting is supplied as a method argument. The conversion is not employed in simple definitions where the Boolean type would have to be specified.
| * | | | | SI-7261 Implicit conversion of BooleanSetting to Boolean and BooleanFlagSom Snytt2013-03-272-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows a more compact expression `if (settings.debug)` instead of `if (settings.debug.value)` and similarly `render(..., printIds = settings.uniqid, ...)`.
* | | | | | Merge pull request #2310 from retronym/ticket/6168Paul Phillips2013-04-0210-1/+149
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | SI-6168 Retain prefix when parsing types in JVM signatures
| * | | | | SI-6168 Retain prefix when parsing types in JVM signaturesJason Zaugg2013-03-2510-1/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reading Java classfiles, the generic signatures are used to construct the corresponding Scala type signatures. In the enclosed test case, the field `SomeClass.f` had the JVM signature: LContext<LSomeClass;>.Field<Ljava.lang.Integer;>; The parser first (correctly) parsed the prefix as `Context[SomeClass]`. It then looked up the type symbol for `Field` in that that type. It then discarded the parsed prefix, and instead used the prefix from the info of the type symbol: `Context[ParentType]`. This commit changes the signature parser after the first `.` to use the result of prior parsing as the prefix. I've also included a test case with Java static inner classes, which don't require any special treatment.
* | | | | | Merge pull request #2343 from ↵Adriaan Moors2013-04-0276-2495/+1862
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | retronym/topic/merge-2.10.x-to-v2.11.0-M2-74-g00e6c8b Merge 2.10.x to master
| * | | | | | Merge remote tracking branch 'origin/2.10.x' into ↵Jason Zaugg2013-04-0276-2495/+1862
|/| | | | | | | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | topic/merge-2.10.x-to-v2.11.0-M2-74-g00e6c8b Conflicts: bincompat-backward.whitelist.conf bincompat-forward.whitelist.conf build.xml src/compiler/scala/reflect/reify/utils/Extractors.scala src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala src/compiler/scala/tools/nsc/transform/patmat/MatchOptimization.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/partest/scala/tools/partest/nest/ReflectiveRunner.scala src/reflect/scala/reflect/internal/Types.scala src/reflect/scala/reflect/runtime/JavaUniverse.scala test/files/run/inline-ex-handlers.check test/files/run/t6223.check test/files/run/t6223.scala test/scaladoc/scalacheck/IndexTest.scala
| * | | | | Merge pull request #2321 from kzys/js-deferAdriaan Moors2013-04-013-23/+30
| |\ \ \ \ \ | | | | | | | | | | | | | | Scaladoc: Load scripts at the bottom, and with a defer attribute
| | * | | | | Scaladoc: Load scripts at the bottom, and with a defer attributeKato Kazuyoshi2013-03-273-23/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To improve latency on modern browsers (which supports defer) and old browsers: * https://www.webkit.org/blog/1395/running-scripts-in-webkit/ * http://developer.yahoo.com/blogs/ydn/posts/2007/07/high_performanc_5/
| * | | | | | Merge pull request #2330 from adriaanm/partest-difftoolsGrzegorz Kossakowski2013-03-3110-2019/+637
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | Use java-diff-utils for diffing in partest.
| | * | | | | | Strip version suffix from diffutils.Adriaan Moors2013-03-293-11/+13
| | | | | | | |
| | * | | | | | Use java-diff-utils for diffing in partest.Adriaan Moors2013-03-2910-2018/+634
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now use the unified diff format, hence the updated check files. It's not clear to me how partest's classpath is managed, but the approach in this commit works for the ant task and script invocation. The diffutils jar is injected in the parent classloader.
| * | | | | | Merge pull request #2314 from adriaanm/build-fixesGrzegorz Kossakowski2013-03-292-335/+222
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | further tweaks to the ant build
| | * | | | | | Clean up pack targets. Better dependency tracking.Adriaan Moors2013-03-271-89/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Target pack.@{project} is considered up to date iff classes emitted by quick.@{project} are. TODO: encapsulate "classes emitted by quick.@{project}". For now, they are duplicated as references to `${build-@{stage}.dir}/classes/@{destproject}` (in staged-scalac and *.build.path)
| | * | | | | | ant clean only zaps the quick stageAdriaan Moors2013-03-271-2/+2
| | | | | | | |
| | * | | | | | Run test.scaladoc before test.suite. Fail fast.Adriaan Moors2013-03-271-1/+1
| | | | | | | |
| | * | | | | | Let continuations library sources determine docs.lib's actualityAdriaan Moors2013-03-261-0/+1
| | | | | | | |
| | * | | | | | Preparation for faster PR validationAdriaan Moors2013-03-262-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added starr.number, so that `ant -propertyfile starr.number -Dlocker.skip=1` works across branches. Introduced target `test.core`, which skips `test.stability`, since that requires `locker == quick`, whereas `locker == starr` with the above settings. (It's interesting to see for which files it fails when that assumption is broken.) Stability will still be tested on a nightly basis. It's rarely broken.
| | * | | | | | Remove duplication in java builds of fjbg/asm/forkjoinAdriaan Moors2013-03-261-66/+31
| | | | | | | |
| | * | | | | | Formatting. Introduce {asm,forkjoin,fjbg}-classes props.Adriaan Moors2013-03-251-74/+79
| | | | | | | |
| | * | | | | | remove unused ant targets: test.ant, test.classload, test.positionsAdriaan Moors2013-03-251-100/+0
| | | | | | | |
| | * | | | | | run test.bc as part of tests on 2.10.xAdriaan Moors2013-03-251-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | also added test.bc-opt target as binary compatibility differs between (non)optimized builds...