| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
SI-5907, SI-5009 case-class copy defaults only for first param list
|
| |
| |
| |
| |
| | |
`copy` no longer returns anonymous functions if there are multiple parameter lists, reverts most of 40e7cab7a2.
Cleaned up the special type completer for copy methods.
|
|\ \
| | |
| | | |
SI-5830 switches: support guards, unreachability
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
turn switches with guards into guard-free switches by collecting all cases
that are (possibly) guarded by different guards but that switch on the same constant,
and pushing the implied if-then-else into the collapsed case body
```
case C if G1 => B1
case C if Gi => Bi
case C if GN => BN
```
becomes
```
case C => if (G1) B1
else if (Gi) Bi
else if (GN) BN
else default() // not necessary if GN == EmptyTree
```
default() is a jump to the default case; to enable this, we wrap a default() { } labeldef
around the last case's body (the user-defined default or the synthetic case that throws the matcherror)
so we can jump to the default case after the last guard is checked
(assuming unreachability is checked, once we ended up in a non-default case,
one of the guards either matches or we go to the default case)
the unreachability analysis is minimal -- we simply check (after rewriting to guard-free form)
that:
- there are no duplicate cases
- the default case comes last
misc notes:
- can't jump in exception handlers (TODO: a more fine-grained analysis on when we need to jump)
- work around SI-6015 (test file run/t5830.scala crashed the inliner)
- propagate type of case body to label def of default case
(needed for existentials, see e.g., t2683)
- the default(){} LabelDef breaks SelectiveANFTransform -- workaround: don't write guarded switches in CPS code
(do the above transformation manually)
|
|\ \ \
| | | |
| | | | |
performance improvements (10% to 20% depending on HDD vs SSD) in GenASM
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
SI-2796 Warn if early definitions are used with a trait.
|
| | | | |
| | | | |
| | | | |
| | | | | |
For which they (currently) have no special meaning.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
tags for AnyVal and AnyRef
|
| | |_|/ /
| |/| | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-6013 Disallow deferred members from intermediate java parents.
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
76c76b28f allowed for the fact that a Java method can override
a super class method without matching its type in a Scala sense;
it need only match its type after erasure. However that change
went too far, and considered a concrete method in a base class
to override a deferred method in a subclass.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Closes SI-5969.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The comment should now better reflect the joys of tryTwice
as discussed during the code review.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Assumption that we enter tryTwice when inferring
the right alternative with an empty buffer is
wrong.
In this particular bug it manifested itself on
if/then/else which share the same context and 'else'
branch was simply flushing the buffer with an
error from the 'then' branch.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix SI-5929 - Verify error with finally and pattern match
|
| | |_|_|_|/
| |/| | | |
| | | | | |
| | | | | |
| | | | | | |
Don't enter all labels in a method when emitting a forward jump, since some
labels will be duplicated (if defined inside finally blocks). For each forward
jump, enter only the label that is needed for that jump.
|
|\ \ \ \ \ \
| |_|_|_|/ /
|/| | | | | |
recovering optimized stability
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
two pullrequests from this morning, combined to merge changes to starrs
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
this uncovers a bug in toolboxes: https://issues.scala-lang.org/browse/SI-6007
however that bug is not critical, so it will be dealt with later
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
TypeTag.String is removed because it's unclear whether it should point to
scala.Predef.String or to java.lang.String. ClassTag.String is removed to
be consistent with TypeTag.String.
This requires re-bootstrapping, because Definitions.scala in locker
expects classTag[String] being automatically generated, whereas starr
disagrees with locker on how to generate that class tag.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
1) type ClassManifest[T] = ClassTag[T] (solves a problem
with toArray[T: ClassManifest] defined on most of the collections;
if these types weren't aliases, then we won't be able to change
the signature of that method to toArray[T: ClassTag], because
that would break source compatibility for those who override
toArray in their custom collections)
2) Compiler-generated manifests no longer trigger deprecation warnings
(this is implemented by using ClassManifestFactory instead of ClassManifest
and ManifestFactory instead of Manifest)
3) Deprecation messages got improved to reflect the changes
that were introduced in 2.10.0-M4.
|
|\ \ \ \ \ \ \
| |_|_|_|_|/ /
|/| | | | | | |
Fix for exponential compile time in specialization.
|
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | | |
Review by @prokopec.
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
SI-2807 Avoid catch all warning for Stable Id patterns
|
| |/ / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-4176 A repeat dose of repeated parameter type sanitization.
|
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- During eta expansion, treat parameters of type A* as Seq[A]
- Do the same for method/class parameters as referred to by an Ident.
Also fixes SI-5967, which shows up during pattern matching.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-5932 Tone down non-sensible == warning with refinements.
|
| | |/ / /
| |/| | |
| | | | |
| | | | | |
Errs on the side of avoiding false positives.
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
Revert pull request #720 (CPS: enable return expressions in CPS code if ...
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
are in tail position)
Reverts commit 0ada0706746c9c603bf5bc8a0e6780e5783297cf.
Reverts commit 51c92f02229098d0b402a65a72267f7a17984022.
Reverts commit cdfbe8e39fbbec00c969cd74f117ae410b98b40b.
Reverts commit 796024c7429a03e974a7d8e1dc5c80b84f82467d.
|
|\ \ \ \
| | | | |
| | | | | |
Don't just swallow `Throwables` while parsing bytecode. Print a warning
|
| | | | |
| | | | |
| | | | | |
This has caused hours of debugging, to find out that 'package X does not have a member Y' were caused by a `NullPointerException`.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix range positions when applying anonymous classes.
|
| | |_|_|/
| |/| | |
| | | | |
| | | | | |
@odersky
|
|\ \ \ \ \
| | | | | |
| | | | | | |
patmat bugfixes and minor clean ups
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
one of the most boring sealed types imaginable, but a sealed type all the same
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
the fix in 0cffdf38d9 was brain dead (only looking at the first argument of the ctor, rather than the first argument list)
the reasoning was that we should not look at the MethodType of the constructor,
but at the argument types directly (since going through the method type would flip variance,
though the ctor arguments are conceptually in covariant positions here)
|
| | |_|/ /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
patmat:
- remove Var's unused 'checked' member; subsumed by 'domain'
- updated docs: no longer using isSuccess in __match
typers: clean up indentation, swap ifs to failure-first
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Closes SI-5148.
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Unfortunately we have to wrap transform to catch all
the MissingRequirementErrors exceptions (wrapped in TypeErrors).
This is because we force the info of the symbol in a couple of
places and we would have to catch all/some of them
(and remove the duplicates as well which really becomes messy).
Review by @axel22.
|
|\ \ \ \
| | | | |
| | | | | |
emit JVM InnerClasses attribute for bean info classes
|