summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | | Merge pull request #5449 from som-snytt/issue/9953Lukas Rytz2016-11-164-1/+21
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | SI-9953 Any Any aborts warn on equals
| * | | | | | | | | | SI-9953 Any Any aborts warn on equalsSom Snytt2016-10-074-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't warn about equals if any `Any` is involved. cf SI-8965 The condition for warning is that both types lub to a supertype of Object.
* | | | | | | | | | | Merge pull request #5440 from som-snytt/issue/9944Lukas Rytz2016-11-163-2/+30
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | SI-9944 Scan after interp expr keeps CR
| * | | | | | | | | | | SI-9944 Scan after interp expr keeps CRSom Snytt2016-10-013-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In an interpolated expression `s"""${ e }"""`, the scanner advances input past the RBRACE. If a multiline string as shown, get the next raw char, because CR is significant.
* | | | | | | | | | | | Merge pull request #5533 from som-snytt/issue/broken-9915Seth Tisue2016-11-161-1/+3
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | SI-9915 Fix test on windows
| * | | | | | | | | | | | SI-9915 Fix test on windowsSom Snytt2016-11-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use `javac: -encoding UTF-8` tool args comment so javac uses correct source encoding.
* | | | | | | | | | | | | Merge pull request #5530 from dwijnand/j-single-unitStefan Zeiger2016-11-161-0/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid double-compiling junit sources
| * | | | | | | | | | | | | Avoid double-compiling junit sourcesDale Wijnand2016-11-161-0/+1
| |/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes scala/scala-dev#266
* | | | | | | | | | | | | Merge pull request #5513 from SethTisue/compiler-rootdocLukas Rytz2016-11-161-6/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | improve top-level compiler/reflect doc text
| * | | | | | | | | | | | | improve top-level compiler/reflect doc textSeth Tisue2016-11-081-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this shows up at http://www.scala-lang.org/api/2.12.0/scala-compiler/ ideally there'd be something better here, but we should at least not link to egregiously outdated stuff
* | | | | | | | | | | | | | Merge pull request #5534 from lrytz/t10059Lukas Rytz2016-11-163-1/+13
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|/ / / / / / / / / |/| | | | | | | | | | | | | SI-10059 reset the `DEFERRED` flag for Java varargs forwarders
| * | | | | | | | | | | | | SI-10059 reset the `DEFERRED` flag for Java varargs forwardersLukas Rytz2016-11-163-1/+13
| | |_|_|_|_|_|_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an abstract method is annotated `@varargs`, make sure that the generated synthetic Java varargs method does not have the `DEFERRED` flag (`ACC_ABSTRACT` in bytecode). The flag lead to an NPE in the code generator, because the ASM framework leaves certain fields `null` for abstract methods (`localVariables` in this case). Interestingly this did not crash in 2.11.x: the reason is that the test whether to emit a method body or not has changed in the 2.12 backend (in c8e6050). val isAbstractMethod = [..] methSymbol.isDeferred [..] // 2.11 val isAbstractMethod = rhs == EmptyTree // 2.12 So in 2.11, the varargs forwarder method was actually left abstract in bytecode, leading to an `AbstractMethodError: T.m([I)I` at run-time.
* | | | | | | | | | | | | Merge pull request #5512 from szeiger/wip/more-compiler-scaladocSeth Tisue2016-11-151-0/+10
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / / / |/| | | | | | | | | | | | Add “test”, “scaladoc” and “repl” projects to scala-compiler docs
| * | | | | | | | | | | | Add “test”, “scaladoc” and “repl” projects to scala-compiler docsStefan Zeiger2016-11-081-0/+10
| |/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the scaladoc bundle for scala-compiler consistent with the binary and source bundles.
* | | | | | | | | | | | Merge pull request #5384 from som-snytt/issue/9915Seth Tisue2016-11-143-2/+36
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | SI-9915 Utf8_info are modified UTF8
| * | | | | | | | | | | | SI-9915 Utf8_info are modified UTF8Som Snytt2016-10-203-2/+36
| | |_|_|/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use DataInputStream.readUTF to read CONSTANT_Utf8_info. This fixes reading embedded null char and supplementary chars.
* | | | | | | | | | | | Merge pull request #5526 from 0xmohit/typo-man-pagesLukas Rytz2016-11-142-2/+2
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Fix typo in scalac, scalap man pages
| * | | | | | | | | | | | Fix typo in scalac, scalap man pagesMohit Agarwal2016-11-132-2/+2
| | |_|_|_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | s/exist status/exit status/
* | | | | | | | | | | | Merge pull request #5525 from som-snytt/issue/8433-9689-212Lukas Rytz2016-11-145-0/+82
|\ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / |/| | | | | | | | | | | SI-8433 SI-9689 Progressive tests
| * | | | | | | | | | | SI-8433 SI-9689 Progressive testsSom Snytt2016-11-125-0/+82
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because no one votes against a progressive test.
* | | | | | | | | | | Merge pull request #5494 from janekdb/topic/2.12.x-scaladoc-spelling-correctionsSeth Tisue2016-11-1172-92/+91
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Typo and spelling corrections
| * | | | | | | | | | | Typo and spelling correctionsJanek Bogucki2016-11-1172-92/+91
|/ / / / / / / / / / /
* | | | | | | | | | | Merge pull request #5517 from SethTisue/remove-manifest-mfJason Zaugg2016-11-111-51/+0
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | remove old, now-unused MANIFEST.MF file
| * | | | | | | | | | | remove old, now-unused MANIFEST.MF fileSeth Tisue2016-11-091-51/+0
| | |_|/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as per https://github.com/scala/scala-dev/issues/211
* | | | | | | | | | | Merge pull request #5303 from xuwei-k/isNaN-boxingJason Zaugg2016-11-112-7/+7
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | avoid boxing
| * | | | | | | | | | | avoid boxingxuwei-k2016-10-282-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scala.runtime.Rich{Double, Float} has `isNaN` and these are value class. Also java.lang.{Double, Float} has `isNaN`. - https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html#isNaN-- - https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html#isNaN-- We can't call `RichDouble#isNaN` because `implicit def double2Double(x: Double): java.lang.Double` is higher priority than `implicit def doubleWrapper(x: Double): RichDouble` ``` $ scala -version Scala code runner version 2.11.8 -- Copyright 2002-2016, LAMP/EPFL $ scala -Xprint:jvm -e "1.0.isNaN" [[syntax trees at end of jvm]] // scalacmd616162202928036892.scala package <empty> { object Main extends Object { def main(args: Array[String]): Unit = { new <$anon: Object>(); () }; def <init>(): Main.type = { Main.super.<init>(); () } }; final class anon$1 extends Object { def <init>(): <$anon: Object> = { anon$1.super.<init>(); scala.this.Predef.double2Double(1.0).isNaN(); () } } } ```
* | | | | | | | | | | | Merge pull request #5335 from rumoku/SI-9888Jason Zaugg2016-11-114-8/+24
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | SI-9888. Prevent OOM on ParRange. Improve toString.
| * | | | | | | | | | | | SI-9888. Prevent OOM on ParRange. Improve toString.Vladimir Glushak2016-10-024-8/+24
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #5387 from dwijnand/root-project-scala-versionJason Zaugg2016-11-111-6/+3
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define the root sbt project's scalaVersion
| * | | | | | | | | | | | | Define the root sbt project's scalaVersionDale Wijnand2016-11-101-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The root project is commonly used as the reference point for values, such as "the scala version" of the (entire) project. For example ENSIME uses it like that. Also disablePublishing already disables publish and publishLocal.
* | | | | | | | | | | | | | Merge pull request #5516 from Ichoran/non-slow-vector-twelveJason Zaugg2016-11-117-13/+11
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improved runtime speed for Vector, restoring previous performance.
| * | | | | | | | | | | | | | Manually inlined all other instances of Platform.arraycopy to System.arraycopyRex Kerr2016-11-096-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to avoid the same kind of slowdowns that Vector was experiencing due to the less aggressive inlining by scalac.
| * | | | | | | | | | | | | | Improved runtime speed for Vector, restoring previous performance.Rex Kerr2016-11-091-5/+4
| | |_|_|_|_|/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All calls to Platform.arraycopy were rewritten as java.lang.System.arraycopy to reduce the work that the JIT compiler has to do to produce optimized bytecode that avoids zeroing just-allocated arrays that are about to be copied over. (Tested with -XX:-ReduceBulkZeroing as suggested by retronym.)
* | | | | | | | | | | | | | Merge pull request #5497 from szeiger/wip/sd-254Jason Zaugg2016-11-111-4/+9
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / / / |/| | | | | | | | | | | | | Don’t include scala-asm.jar in scala-compiler.jar
| * | | | | | | | | | | | | Don’t include scala-asm.jar in scala-compiler.jarStefan Zeiger2016-11-101-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/scala/scala-dev/issues/254
* | | | | | | | | | | | | | Merge pull request #5503 from dsbos/dsbos-SpecFixQuotesInProseSeth Tisue2016-11-102-4/+4
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Spec: Fix 2 pairs of quotes in text.
| * | | | | | | | | | | | | | Fix two instances of ASCII `...' quoting to Unicode ‘...’ (to match others).Daniel Barclay2016-11-051-2/+2
| | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | Added U+hhhh values for quote characters to clarify.Daniel Barclay2016-11-051-2/+2
| | |/ / / / / / / / / / / / | |/| | | | | | | | | | | |
* | | | | | | | | | | | | | Merge pull request #5432 from dwijnand/partest-scalac_optsAdriaan Moors2016-11-101-1/+4
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / / / |/| | | | | | | | | | | | | Add support for -Dpartest.scalac_opts to the partest command
| * | | | | | | | | | | | | Add support for -Dpartest.scalac_opts to the partest commandDale Wijnand2016-09-291-1/+4
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Merge pull request #5460 from som-snytt/issue/6978Jason Zaugg2016-11-104-1/+14
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SI-6978 No linting of Java parens
| * | | | | | | | | | | | | | SI-6978 No linting of Java parensSom Snytt2016-10-154-1/+14
| | |_|_|_|_|/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't lint overriding of nullary by non-nullary when non-nullary is Java-defined. They can't help it.
* | | | | | | | | | | | | | Merge pull request #5486 from som-snytt/issue/6734-synthsJason Zaugg2016-11-102-3/+35
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SI-6734 Synthesize companion near case class
| * | | | | | | | | | | | | | SI-6734 CommentSom Snytt2016-10-312-16/+11
| | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | SI-6734 Synthesize companion near case classSom Snytt2016-10-272-3/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tweak the "should I synthesize now" test for case modules, so that the tree is inserted in the same tree as the case class.
* | | | | | | | | | | | | | | Merge pull request #5509 from lrytz/t10032Lukas Rytz2016-11-105-20/+288
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SI-10032 Fix code gen with returns in nested try-finally blocks
| * | | | | | | | | | | | | | | Fix returns from within finalizersLukas Rytz2016-11-095-26/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a return in a finalizer was reached through a return within the try block, the backend ignored the return in the finalizer: try { try { return 1 } finally { return 2 } } finally { println() } This expression should evaluate to 2 (it does in 2.11.8), but in 2.12.0 it the result is 1. The Scala spec is currently incomplete, it does not say that a finalizer should be exectuted if a return occurs within a try block, and it does not specify what happens if also the finally block has a return. So we follow the Java spec, which basically says: if the finally blocks completes abruptly for reason S, then the entire try statement completes abruptly with reason S. An abrupt termination of the try block for a different reason R is discarded. Abrupt completion is basically returning or throwing.
| * | | | | | | | | | | | | | | SI-10032 Fix code gen with returns in nested try-finally blocksLukas Rytz2016-11-083-7/+200
| | |_|_|/ / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return statements within `try` or `catch` blocks need special treatement if there's also a `finally` try { return 1 } finally { println() } For the return, the code generator emits a store to a local and a jump to a "cleanup" version of the finally block. There will be 3 versions of the finally block: - One reached through a handler, if the code in the try block throws; re-throws at the end - A "cleanup" version reached from returns within the try; reads the local and returns the value at the end - One reached for ordinary control flow, if there's no return and no exception within the try If there are multiple enclosing finally blocks, a "cleanup" version is emitted for each of them. The nested ones jump to the enclosing ones, the outermost one reads the local and returns. A global variable `shouldEmitCleanup` stores whether cleanup versions are required for the curren finally blocks. By mistake, this variable was not reset to `false` when emitting a `try-finally` nested within a `finally`: try { try { return 1 } finally { println() } // need cleanup version } finally { // need cleanup version try { println() } finally { println() } // no cleanup version needed! } In this commit we ensure that the variable is reset when emitting nested `try-finally` blocks.
* | | | | | | | | | | | | | | Merge pull request #5501 from SethTisue/sbt-deprecationsJason Zaugg2016-11-102-66/+73
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | avoid deprecated sbt 0.12 operators
| * | | | | | | | | | | | | | | sbt build: omit `: _*` when calling `.settings`Seth Tisue2016-11-081-51/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this is allowed in recent sbt versions