| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Use LambdaMetafactory where possible for lambda creation.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
```
scala> (x: Int) => {??? : Int}
res2: Int => Int = $$Lambda$1371/1961176822@6ed3ccb2
scala> res2(42)
scala.NotImplementedError: an implementation is missing
at scala.Predef$.$qmark$qmark$qmark(Predef.scala:225)
at .$anonfun$1(<console>:8)
at $$Lambda$1371/1961176822.apply$mcII$sp(Unknown Source)
... 33 elided
scala> (x: Int, y: Long) => {??? : Int}
res4: (Int, Long) => Int = $$Lambda$1382/1796047085@6f8e8894
scala> res4(0, 0L)
scala.NotImplementedError: an implementation is missing
at scala.Predef$.$qmark$qmark$qmark(Predef.scala:225)
at .$anonfun$1(<console>:8)
at $$Lambda$1382/1796047085.apply$mcIIJ$sp(Unknown Source)
... 33 elided
```
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the ant build is run with `-Dscala-java8-compat.package`,
the contents of `org.scala-lang.modules:scala-java8-compat` are
spliced into `scala-library.jar`. This is handy to facilitate
downstream testing of indy lambdas, we can just use the the compiler
options `-target 1.8 -Ydelambdafy:method -Xexperimental` without
needed to add `scala-java8-compat.jar` to the compile and runtime
classpaths. (Classpath augmentation doesn't appear to be straight
forward in partest or in the community build.)
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Suitable lambdas are identified in Delambdafy and marked with
such with a tree annotation that includes the
data needed by the backend to emit an invokedynamic instruction.
GenBCode to rewrite instantiation of such anonymous
function classes with an invokedynamic instruction. At this
stage, I don't plan to merge the support for this into GenASM.
Between these points, the lambda capture is represented as an
application of a dummy factory symbol:
```
<dummy>(captures...) : FunctionN
```
Demo:
```
% wget http://central.maven.org/maven2/org/scala-lang/modules/scala-java8-compat_2.11/0.3.0/scala-java8-compat_2.11-0.3.0.jar
% qscala -classpath scala-java8-compat_2.11-0.3.0.jar -Ydelambdafy:method -target:jvm-1.8 -Ybackend:GenBCode
Welcome to Scala version 2.11.6-20150309-144147-c91c978c81 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_25).
Type in expressions to have them evaluated.
Type :help for more information.
scala> (() => "").getClass
res0: Class[_ <: () => String] = class $$Lambda$1/871790326
```
I have also corrected an error in a previous commit. The newly added
symbol test, `isDelambdafyTarget`, needs to check for the `ARTIFACT`
flag, as that is what is added to the method by `Uncurry`.
|
|\ \
| | |
| | | |
Fix documentation of assertions in Predef
|
| | |
| | |
| | | |
Assertions can be elided at compile time; they generate no runtime conditional code and are in fact run unconditionally if not elided during compilation. Updated documentation to reflect that.
|
|\ \ \
| | | |
| | | | |
SI-9282 Avoid obscuring an exception during classfile parsing
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Based on analysis of a stack trace in this bug report, I identified
a code path in `ClassfileParser` that can lead to an NPE in its
exception handling code. If `val in = new AbstractFileReader(file)`
throws (e.g during its construction in which it eagerly reads the
file `val buf: Array[Byte] = file.toByteArray`), the call to
`in.file` in `handleError` will NPE.
This commit stores the active file directly a field in ClassfileParser
and uses this in the error reporting.
|
|\ \ \ \
| | | | |
| | | | | |
SI-9285 Don't warn about non-sensible equals in synthetic methods
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
Notably, in the synthetic equals method of a case class. Otherwise,
we get an unsuppressable warning when defining a case class with a
`Unit`-typed parameter, which some folks use a placeholder for
real type while evolving a design.
|
|\ \ \ \
| | | | |
| | | | | |
Remove unused, mostly commented out doc/html/page/Source.scala
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This file seems to be some early, unfinished draft. It's unused and
mostly commented out. De facto it hasn't been changed since this
version:
https://github.com/scala/scala/blob/d9e3dde6d6d18b9a93e7566447cc3ee342f033d5/src/compiler/scala/tools/nsc/doc/html/page/Source.scala
Just in meantime someone updated imports, moved it to other package
etc. but nothing more.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Cleanup files in wrong place
|
| | | | | | |
|
| |/ / / / |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Update intellij project files for IDEA 14.1 and latest Scala plugin
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Removes the src/intellij-14 folder and moves everything back to
src/intellij.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Follow HTTP redirects when downloading bootstrap binaries
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
After a recent change to the repository that hosts these JARs,
we now get a HTTP redirect to the new destination. We need to
explicitly instruct curl to follow this.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
PR validation publishes zinc to $prRepoUrl
|
|/ / / /
| | | |
| | | |
| | | | |
Companion to https://github.com/scala-ide/uber-build/pull/73
|
|\ \ \ \
| |/ / /
|/| | | |
spec: Remove obsolete rules related to scala.NotNull
|
|/ / /
| | |
| | |
| | |
| | | |
These rules were removed in #2244 and scala.NotNull itself was
deprecated.
|
|\ \ \
| | | |
| | | | |
Spec improvements
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
SI-9279 Improve performance of bash runner script
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In fbe897d16, the template for bash scripts (scala/scalac/etc) was
modified to fix processing of `-J`, `-bootcp`.
This involved looping through the argument array and filtering out
options like `-bootcp` that only influence the script, and shouldn't
be passed to the JVM.
However, the mechanism to do this uses an inefficient, erm,
"CanBuildFrom", and under the load of even a few hundred source
files takes half a second before the JVM starts. Throw 2000 files
at it, and you have to wait ten seconds!
This commit uses a more efficient array append operator. This requires
Bash 3 or above. Hopefully it is safe to presume this version these
days, it's been around for a decade.
Results:
```
% time ~/scala/2.11.6/bin/scalac -J-NOJVM abcdedfghijklmnopqrtsuvwxyv{1..2000} 2>&1
Unrecognized option: -NOJVM
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
real 0m7.765s
user 0m7.734s
sys 0m0.028s
% time ./build/quick/bin/scalac -J-NOJVM abcdedfghijklmnopqrtsuvwxyv{1..2000} 2>&1
Unrecognized option: -NOJVM
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
real 0m0.144s
user 0m0.124s
sys 0m0.022s
```
Thanks to Stephan Schmidt for pointing out the performance gulf.
|
|\ \ \
| | | |
| | | | |
SI-9254 UnrolledBuffer appends in wrong position
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixed two bugs in insertion (insertAll of Unrolled):
1. Incorrect recursion leading to an inability to insert past the first chunk
2. Incorect repositioning of `lastptr` leading to strange `append` behavior after early insertion
Added tests checking that both of these things now work.
Also added a comment that "waterlineDelim" is misnamed. But we can't fix it now--it's part of the public API. (Shouldn't be, but it is.)
|
|\ \ \ \
| | | | |
| | | | | |
SI-9197 Duration.Inf not a singleton when deserialized
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Made `Duration.Undefined`, `.Inf`, and `.MinusInf` all give back the singleton instance instead of creating a new copy by overriding readResolve.
This override can be (and is) private, which at least on Sun's JDK8 doesn't mess with the auto-generated SerialVersionUIDs.
Thus, the patch should make things strictly better: if you're on 2.11.7+ on JVMs which pick the same SerialVersionUIDs, you can recover singletons. Everywhere else you were already in trouble anyway.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-9275 Fix row-first display in REPL
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
A missing range check in case anyone ever wants to use
```
-Dscala.repl.format=across
```
which was observed only because of competition from Ammonite.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix many typos
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This commit corrects many typos found in scaladocs and comments.
There's also fixed the name of a private method in ICodeCheckers.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Don't crash GenBCode for value classes with a self declaration
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
If a value class has a self declaration
class V(x: Long) extends AnyVal { self => /* ... */ }
`vClassSymbol.typeOfThis.typeSymbol` is `class Long` in the backend.
The InlineInfo for traits contains a field for the self type of the
trait. This is required for re-writing calls to final trait methods
to the static implementation method: the self type appears in the
impl method signature.
By mistake, the backend was recording the self type of all classes,
not only of traits. In the case of a value class with a self
declaration, this broke the assumption that the self type is always
a class type (not a primitive type).
The simple fix: only record the self type for traits.
|
|\ \ \ \ \ \ \
| |_|_|_|_|/ /
|/| | | | | | |
Experimental sbt build [ci: last-only]
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
I added build configuration to ask SBT to forcible override the Scala
version in the subproject to the declared bootstrap version. I did
this in response to a warning by SBT the declared `scalaVersion`
has been evicted.
However, we actually *want* the newer version. To get rid of the
warning, we need to exclude all `"org.scala-lang" % "*"` when
depending on Scala modules. This cleanly breaks the cycle.
Here's a diff of `*/dependencyClasspath` as a result of this patch:
https://gist.github.com/retronym/217c76001b1b81798042
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
In favour of explicitly ignoring the ones we know contain
SBT build output.
Rationale: we used to have a package named target. Admittedly
we thought better of that (55109d0d253) so it is now called `meta`,
but let's not get lazy and encode a poor practice into our
gitignore.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
There were two inconsistencies in building asm & forkjoin:
1. Asm classes lived in `build/asm`, while forkjoin's were in
`build/libs/classes/forkjoin`.
2. Though no jars are needed for these projects, forkjoin was packaged,
but asm was not.
No reason for these inconsistencies could be found in the history.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
To ensure the sbt build matches the ant build, diff their output.
The scripts just delegates to `diff` command that compares directories
recursively. We've added some handy ignore patterns (e.g. for .complete
files).
Ignore locker and deps dirs when comparing build and build-sbt,
these directories are needed by Ant build only.
Ignore irrelevant jars in build/pack/lib generated by the Ant build.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Partest tests are defined in Integration configuration.
This means you need to run them with `test/it:test` command. We put them
in separate configuration because they are slow to run so user needs to
ask explicitly for partest to run.
Introduce a common way of setting jar location so it can be reused between
`scalaSubprojectSettings` and `partestJavaAgent`.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Add dependency on scaladoc in junit subproject, as required by
6e6632e (it introduced a junit test for scaladoc).
Enable assertion stack traces and info logging of each test.
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
- Explicitly set [un]managed[re]sourceDirectories for all
projects to improve the import into IntelliJ
- Add partest extras project, that contains scala/scala specific
extensions to partest for use in partest and junit tests.
- Add junit project, which contains unit tests for the compiler and
library.
|