summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2821 from xeno-by/topic/fundep-materializationAdriaan Moors2013-08-168-14/+160
|\ | | | | SI-7470 implements fundep materialization
| * SI-7470 implements fundep materializationEugene Burmako2013-08-138-14/+160
| | | | | | | | | | | | | | This fix provides implicit macros with an ability to affect type inference in a more or less sane manner. That's crucial for materialization of multi-parametric type class instances (e.g. Iso's from shapeless). Details of the technique can be found in comments.
* | Merge pull request #2803 from adriaanm/rebase-2728Adriaan Moors2013-08-161-18/+16
|\ \ | | | | | | SI-7658 Prevent StackOverflowError in ScalaRunTime.stringOf
| * | Remove unused private[scala] def ScalaRunTime.checkZipSimon Ochsenreither2013-08-081-14/+0
| | |
| * | SI-7658 Prevent StackOverflowError in ScalaRunTime.stringOfSimon Ochsenreither2013-08-081-4/+16
| | |
* | | Merge pull request #2785 from soc/SI-7704Adriaan Moors2013-08-167-36/+30
|\ \ \ | | | | | | | | SI-7704 Fix partest's test category selection
| * | | Clean up ConsoleRunner, --> returns Boolean ...Simon Ochsenreither2013-07-303-14/+9
| | | | | | | | | | | | | | | | ... not Unit now.
| * | | Add some explicit return types to s.t.c._Simon Ochsenreither2013-07-304-16/+15
| | | |
| * | | SI-7704 Fix partest's test category selectionSimon Ochsenreither2013-07-303-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My recent changes to command line parsing in 6090709 broke partest's functionality of picking test categories (e. g. --pos or --run). The breakage was caused because scala.tools.cmd._ stored the command line options with the `--` prefix, but TestKinds.standardKinds did not.
* | | | Merge pull request #2798 from som-snytt/issue/7544-errmsgAdriaan Moors2013-08-168-13/+11
|\ \ \ \ | | | | | | | | | | SI-7544 Interpolation message for %% literal
| * | | | StringContext#checkLengths reports bad args countSom Snytt2013-08-062-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since interpolator args are of type Any, it's easy to write s(args) instead of s(args: _*). I wonder if Xlint would have warned me about that.
| * | | | In tests, interpolation is no longer -Xperimental.Som Snytt2013-08-064-4/+0
| | | | |
| * | | | SI-7544 Interpolation message for %% literalSom Snytt2013-08-062-6/+7
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new error text: "conversions must follow a splice; use %% for literal %, %n for newline". The error is emitted when % is not at the start of a part; only the non-conversions %% and %n are allowed. It would be nice if it were convenient to parse the part to see what the user may have intended, but c'est l'erreur.
* | | | Merge pull request #2831 from soc/SI-7624Grzegorz Kossakowski2013-08-1593-2610/+1346
|\ \ \ \ | | | | | | | | | | SI-7624 Fix -feature and some -Xlint warnings
| * | | | Whitespace fixes in scala/tools/scalapSimon Ochsenreither2013-08-1531-294/+293
| | | | |
| * | | | SI-7624 Fix -feature warnings in scala/tools/scalapSimon Ochsenreither2013-08-1525-174/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and move scalap.scala.tools.scalap.scalax.rules to scalap.scala.tools.scalap.rules now that all the Monad/Functor/ Applicatve/... stuff has been removed.
| * | | | SI-7624 Replace new{Term,Type}Name with {Term,Type}NameSimon Ochsenreither2013-08-153-11/+11
| | | | |
| * | | | SI-7624 Fix a few remaining -Xlint warnings ...Simon Ochsenreither2013-08-1525-70/+38
| | | | | | | | | | | | | | | | | | | | | | | | | in various places. This includes actors, compiler (mostly some new macro parts) continuations, partest, scaladoc, scalap.
| * | | | SI-7624 Fix -Xlint warnings in AnyVal-related codeSimon Ochsenreither2013-08-1511-1771/+629
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes are actually pretty small: scala.language.implicitConversions is moved around so that it is only emitted to the source file if there is an actual implicit conversion. The rest of the diff are mostly the new generated source files reflecting that change.
| * | | | Formatting fixes for AnyValSimon Ochsenreither2013-08-151-59/+42
| | | | | | | | | | | | | | | | | | | | | | | | | The files are not regenerated here, because additional fixes will follow in the next commit.
| * | | | SI-7624 Fix -feature warnings and build with -featureSimon Ochsenreither2013-08-1510-20/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I added a language.existential import to LazyCombiner.scala which should not be necessary, but causes a spurious warning otherwise: scala/src/library/scala/collection/parallel/mutable/LazyCombiner.scala:33: warning: the existential type scala.collection.parallel.mutable.LazyCombiner[_$1,_$2,_$3] forSome { type _$1; type _$2; type _$3 <: scala.collection.generic.Growable[_$1] with scala.collection.generic.Sizing }, which cannot be expressed by wildcards, should be enabled by making the implicit value scala.language.existentials visible. if (other.isInstanceOf[LazyCombiner[_, _, _]]) { ^ I created ticket SI-7750 to track this issue.
* | | | | Merge pull request #2792 from ScrapCodes/partest-script-fixedAdriaan Moors2013-08-151-1/+4
|\ \ \ \ \ | | | | | | | | | | | | Bug fix ! , if $color_opts is unset partest script does not work.
| * | | | | Added a warning from scala runner script.Prashant Sharma2013-08-131-0/+3
| | | | | |
| * | | | | Bug fix ! , if $color_opts is unset partest script does not work.Prashant Sharma2013-08-011-1/+1
| | | | | |
* | | | | | Merge pull request #2819 from som-snytt/issue/regextract-charAdriaan Moors2013-08-142-0/+96
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7737 Regex matches Char
| * | | | | | SI-7737 Regex matches CharSom Snytt2013-08-102-0/+96
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enables Char extraction by regex. ``` val r = """(\p{Lower})""".r "cat"(0) match { case r(x) => true } val nc = """\p{Lower}""".r "cat"(0) match { case nc() => true } ```
* | | | | | Merge pull request #2791 from som-snytt/issue/7265-2.11Adriaan Moors2013-08-143-31/+16
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7265 javaSpecVersion, adjust isJava... tests for 2.11
| * | | | | | SI-7265 javaSpecVersion, adjust isJava... testsSom Snytt2013-08-013-31/+16
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make this and related properties public, because they are useful. This change ought to have been committed at 2.11 and then backported with restrictions, rather than vice-versa. Note that they are defined in the order, version, vendor and name, which is the order from the underlying javadoc. It would be a neat feature of the PR validator, as previously imagined, to run a "pending" test and then, on success and merge, to move it automatically to the canonical suite.
* | | | | | Merge pull request #2780 from lcycon/lcycon-deprecate_lockAdriaan Moors2013-08-141-0/+1
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Add deprecation warning to scala.concurrent.Lock class
| * | | | | Add deprecation warning to lock classLuke Cycon2013-07-291-0/+1
| | | | | |
* | | | | | Merge pull request #2804 from adriaanm/rebase-2763Adriaan Moors2013-08-123-3/+28
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7690 ghost error message fails compile [Rebase of #2763]
| * | | | | | SI-7690 ghost error message fails compilePaul Phillips2013-08-113-3/+28
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | I won't even try to explain the error reporting code, because it would have no basis in reality. However this change appears to fix the symptom reported.
* | | | | | Merge pull request #2807 from som-snytt/issue/partest-dirAdriaan Moors2013-08-127-67/+55
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7729 Does Par-Test work? Absolutely!
| * | | | | | Log file is zapped before test runSom Snytt2013-08-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all test configurations handle an existing log file. In particular, kicking off javac will append to the log file and always fail the test. Don't even ask how I know that.
| * | | | | | SI-7729 Does Par-Test work? Absolutely!Som Snytt2013-08-084-22/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Testicolor just passed file arguments through; this commit does either toAbsolute or getAbsoluteFile (depending on the File API impedance mismatch) at ConsoleRunner (command line) and Runner (ant supplies absolute paths, but in case sbt runner doesn't, and who knows). It also sprinkles toAbsolute internally, where it may be redundant. Do I mean redundant or redolent? I noticed that my branch from last year relativized to test root always; so this is one of those choices one commits to. The point of breakage in this case was, if a path is not absolute, use test root / path, which only works (of course) if the relative path is relative to test root, which is no longer the case. Because all paths are now calculated with respect to the test file path, the "out" dir would change its relative path depending on the invocation.
| * | | | | | Par-Test split checks work againSom Snytt2013-08-084-45/+36
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check files split into conditional blocks with partest flags have been broken since the new diff regime. For some reason, no one noticed. The clever scheme to "filter the diff" instead of just filtering the check file is abandoned as futile and unnecessary. Fix java6 checkfile for ifdiff fix.
* | | | | | Merge pull request #2764 from folone/masterGrzegorz Kossakowski2013-08-124-13/+99
|\ \ \ \ \ \ | | | | | | | | | | | | | | Making map2Conserve occupy constant stack space in spirit of SI-2411.
| * | | | | | Make map2Conserve occupy constant stack space in spirit of SI-2411George Leontiev2013-08-083-7/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I recently discovered a StackOverflowError, caused by this function: https://gist.github.com/folone/7b2f2e2a16314ab28109 The circumstances are pretty extreme, still having a tail-recursive function seems to be a good idea. The function behaves the same way old function did (supported by tests), which is not really how map2 behaves. I did not change this behavior to not introduce any regression. I actually tried to make it behave like map2, and it does introduce regression.
| * | | | | | Move map2Conserve to a new home, next to map2.George Leontiev2013-08-082-13/+14
| | |/ / / / | |/| | | |
* | | | | | Merge pull request #2812 from xeno-by/topic/defdef-name-now-termnameGrzegorz Kossakowski2013-08-127-9/+9
|\ \ \ \ \ \ | | | | | | | | | | | | | | DefDef.name is now TermName again
| * | | | | | DefDef.name is now TermName againEugene Burmako2013-08-107-9/+9
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | Now when there's no hope left for type macros, it's reasonable to provide a more specific type for DefDef.name.
* | | | | | Merge pull request #2797 from paulp/pr/erasure-n-squaredGrzegorz Kossakowski2013-08-122-1/+37
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Fix N^2 spot in erasure.
| * | | | | Fix N^2 spot in erasure.Paul Phillips2013-08-052-1/+37
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An expression containing nested casts would type the same tree 2^N times where N is the number of nested casts. This was particularly visible in Vector.scala where one can find a six-cast expression. It's currently line "why was six afraid of seven", aka line 789. display5((index >> 25) & 31) .asInstanceOf[Array[AnyRef]]((index >> 20) & 31) .asInstanceOf[Array[AnyRef]]((index >> 15) & 31) .asInstanceOf[Array[AnyRef]]((index >> 10) & 31) .asInstanceOf[Array[AnyRef]]((index >> 5) & 31) .asInstanceOf[Array[AnyRef]](index & 31) .asInstanceOf[T] Compiling Vector.scala, before/after. < #unique types : 10805 > #unique types : 9722 < #created tree nodes : 26716 > #created tree nodes : 25647 I found a similar bug about a year ago in 39f01d4f48. It's interesting to consider how little defense we have against bugs of this nature - visually non-obvious differences in tree traversal can have spectacular impact on complexity.
* | | | | Merge pull request #2741 from retronym/topic/intellij-modularAdriaan Moors2013-08-0816-23/+153
|\ \ \ \ \ | |_|/ / / |/| | | | Scrubbing up the IntelliJ Config
| * | | | Scrubbing up the IntelliJ ConfigJason Zaugg2013-07-2916-23/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add recently sprouted modules (xml and parser-combinators) - Replace some of the documentation with a setup script - Update Ant build to copy Maven sourced JARs to ./build/deps. These are included in the IntelliJ classpath. - Define the library for Ant at the project level based on ./lib, rather than asking the user to define global library. - Disable Type Aware Highlighting by default. IntelliJ now can build everything within the IDE with CTRL-F9.
* | | | | Merge pull request #2776 from gkossakowski/symbolTable-refactoringsGrzegorz Kossakowski2013-08-0625-223/+434
|\ \ \ \ \ | |_|/ / / |/| | | | Refactor the cake so SymbolTable does not depend on Global
| * | | | Add sample to SymbolTableTest using custom symbols and type.Grzegorz Kossakowski2013-08-021-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | Add a test which demonstrates how one can create symbols and types from scratch and perform sub type check using them.
| * | | | Address TODOs around SymbolLoaders and SymbolTable.Grzegorz Kossakowski2013-07-3010-75/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SymbolTable refactoring introduced some TODOs that were supposed to be addressed after M5 release. The reason I couldn't address those problems right away was a conflict with our plans to modularize Scaladoc and interactive. However, we decided to delay that work until after M5 is released so addressing TODOs is not blocked anymore. This commit introduces the following changes: * Eclipse project definitions for interactive and scaladoc depend on scala-compiler project so they are builded against latest version of the compiler (quick) instead of STARR. This aligns our Eclipse project definitions with build.xml structure. * Introduce GlobalSymbolLoaders class which wires dependencies of SymbolLoaders with assumption of dependency on Global. * Switch to GlobalSymbolLoaders in BrowsingLoaders, interactive Global and ScaladocGlobal; this eliminates all TODO comments introduced before
| * | | | Fix Platform type in Global to be JavaPlatform.Grzegorz Kossakowski2013-07-273-40/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment we have just one Platform: JavaPlatform in the compiler. The whole Platform abstraction feels dubious and Java backends need to downcast to JavaPlatform to implement some optimizations. It seems like for now it's just better to fix platform declared in Global to be JavaPlatform and get rid of downcasting. I checked that even JavaScript backend declares itself as a subtype of JavaPlatform so it seems like our abstraction is not that useful. If we have an alternative platform with specific requirements we might want to refactor our Platform abstraction again but for now it seems dubious to pay a price for abstraction nobody uses.
| * | | | Add example of SymbolTable unit test.Grzegorz Kossakowski2013-07-272-0/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a SymbolTableTest which contains all the code needed to initialize a SymbolTable in JUnit environment. It shows that initialization of definitions works and one can easily lookup some symbols and perform tests like subtyping tests.