| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
doc for Types.baseClasses has Linearization definition reversed from spec 5.1.2
|
| | |
|
|\ \
| | |
| | | |
SI-7110 Warn about naked try without catch/finally
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | | |
On good advice of reviewer.
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | | |
SI-7237 Always choose ForkJoinTaskSupport
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
ForkJoinTaskSupport works on Hotspot, Avian and J9,
while ThreadPoolTaskSupport causes the test
test/files/scalacheck/parallel-collections
to reliably hang on all three.
|
|\ \ \ \
| |/ / /
|/| | | |
SI-7261 Implicit conversion of BooleanSetting to Boolean and BooleanFlag
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This allows a more compact expression `if (settings.debug)` instead of
`if (settings.debug.value)` and similarly `render(..., printIds = settings.uniqid, ...)`.
|
|\ \ \ \
| | | | |
| | | | | |
SI-6168 Retain prefix when parsing types in JVM signatures
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
Scaladoc: Load scripts at the bottom, and with a defer attribute
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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/
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-7285 Fix match analysis with nested objects
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The fix for SI-6146 introduced `nestedMemberType` to
enumerate sealed subtypes based on the (prefixed) type
of the scrutinee and the symbols of its sealed subclasses.
That method needed to widen `ThisType(modSym)`s to
`ModuleTypeRef(modSym)` before calling `asSeenFrom`.
However, this could lead to confused in the match analysis,
which sees `ModuleTypeRef` as distinct from singleton types
on the same modules (after all, they aren't =:=). Spurious
warnings ensued.
This commit makes two changes:
- conditionally re-narrow the result of `asSeenFrom` in `nestedMemberType`.
- present `a.b.SomeModule.type` as `SomeModule` in warnings emitted
by the pattern matcher.
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-7290 Discard duplicates in switchable alternative patterns.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
- make a def a val, we only need to compute it once
- add a clarifying comment
- only report the first duplicate
|
| | |/ / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The pattern matcher must not allow duplicates to hit the
backend when generating switches. It already eliminates then
if they appear on different cases (with an unreachability warning.)
This commit does the same for duplicated literal patterns in an
alternative pattern: discard and warn.
|
| |\ \ \ \ \ \ \
| | |_|/ / / / /
| |/| | | | | | |
SI-6387 Clones accessor before name expansion
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
When a symbol's name is expanded due to a conflict during
composition (e.g. multiple traits with same-named members, but
which are not both visible at the language level in the concrete
class) the compiler renames some symbols with expanded names which
embed the full name of the declaring class to avoid clashes.
In the rare cases when the accessor overrides the member in base
class, such expansion either results in AbstractMethodError when
the base method is abstract, or, even worse, can change the
semantics of the program.
To avoid such issues, we clone the accessor symbol, clear its
ACCESSOR flag and enter the symbol with an unchanged name.
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
[backport] SI-7237 Always choose ForkJoinTaskSupport
|
| | |/ / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
... on Java 6 and above.
ForkJoinTaskSupport works on Hotspot, Avian and J9,
while ThreadPoolTaskSupport causes the test
test/files/scalacheck/parallel-collections
to reliably hang on all three.
We keep ThreadPoolTaskSupport around to keep the hope
alive that we still have a glimpse of 1.5 support.
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-7246 Make $outer pointer elision Java aware
|
| | |/ / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
In e0853b3, a space-saving optimization elided the outer pointer
of inner classes if the the (protected) outer pointer of the
immediate parent class was guaranteed to point to the same instance.
But, this check failed to account for Java parent classes, which
don't follow the Scala scheme. This commit disables the optimization
in that case.
The original test case in e0853b3 was anemic, I've fleshed it out to:
- test the presense or absense of $outer pointers with Java reflection
- test the optimization works in the presense of aliased and annotated
aliased types. (The former worked already, the latter required a
change to the implementation.)
- Test the negative case when the prefixes don't line up and the
subclass in fact needs its own $outer.
This patch is based on work by Euguene Vigdorchik with some
additions by Jason Zaugg.
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-7299 Improve error message for eta-expanding 23+ param method
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Before, we got `error: missing arguments for method f`.
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Read version 51 (JDK 7) class files.
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Based on the review of https://github.com/scala/scala/pull/2257, this
commit adds a debuglog when an invokedynamic instruction is found
during class file parsing as a reminder that the implementation is
just a place holder.
|
| | | |/ / / / / /
| | |/| | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This commit makes the ClassFileReader/ICodeReader parse class files
from JDK 7 (class file version 51). It does that by skipping over
the method handle related entries in the constant pool and by doing
some dummy processing on invoke dynamic instructions. The inliner
is updated to not try to inline a method with an invoke dynamic
instruction. A place holder INVOKE_DYNAMIC instruction is added to ICode
but it is designed to create an error if there's ever any attempt to
analyze it. Because the inliner is the only phase that ever tries
to analyze ICode instructions not generated from Scala source and
because Scala source will never emit an INVOKE_DYNAMIC, the place
holder INVOKE_DYNAMIC should never cause any errors.
A test is included that generates a class file with INVOKE_DYNAMIC
and then compiles Scala code that depends on it.
|
| | |/ / / / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Because it will generate a useless element like "</img>".
To made matters worse, Scaladoc used to generate the element with
attributes (like </img src="...">). That's why we had SI-6580.
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Build cleanup 2.10
|
| | |\ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Conflicts:
build.xml
|
| |\ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
SI-7013 Scaladoc: Fix StackOverflowError
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
No one see the result value of parse and if so, it's tail-recursive.
|
| |\ \ \ \ \ \ \ \ \ \
| | |_|_|/ / / / / / /
| |/| | | | | | | | | |
SI-7251, compiler crash with $.
|
| |\ \ \ \ \ \ \ \ \ \
| | |_|_|_|_|/ / / / /
| |/| | | | | | | | | |
SI-7253: respect binary compatibility constraints
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Rename isInterfaceCall -> needsInterfaceCall, which is more accurate since a
receiver can't literally be an interface call.
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
The JLS requires, as an exception to generate calls referring to Object for all
methods defined in Object itself; hence, whenever the method owner is Object,
the call should refer to the method owner. The previous commit implemented this
directly in useMethodOwner, so the special case for Object in isInterfaceCall is
now redudant. Hence, remove it.
|