| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit makes GenICode prevent the generation of
most unreachable blocks. The new unreachable block prevention code can
be disabled with a compiler flag.
Because full unreachable analysis is no longer necessary for
normal code it makes the unreachable block analysis run only under
-optimise.
A test is included to make sure unreachable code doesn't cause issues
in code gen.
A concrete example will help.
def foo(): X = {
try
return something()
catch {
case e: Throwable =>
println(e)
throw e
}
unreachableCode()
]
Here unreachableCode() is unreachable but GenICode would create ICode
for it and then ASM would turn it into a pile of NOPS.
A previous commit added a reachability analysis step to eliminate
that unreachable code but that added a bit of time to the
compilation process even when optimization was turned off.
This commit avoids generating most unreachable
ICode in the first place so that full reachability analysis is
only needed after doing other optimization work.
The new code works by extending a mechanism that was already in place.
When GenICode encountered a THROW or RETURN it would put the
current block into "ignore" mode so that no further instructions
would be written into the block. However, that ignore mode flag
was itself ignored when it came to figuring out if follow on blocks
should be written. So this commit goes through places like try/catch
and if/else and uses the ignore mode of the current block to decide
whether to create follow on blocks, or if it already has, to kill by
putting them into ignore mode and closing them where they'll be
removed from the method's list of active blocks.
It's not quite as good as full reachability analysis. In particular
because a label def can be emitted before anything that jumps to it,
this simple logic is forced to leave label defs alone and that means
some of them may be unreachable without being removed. However, in
practice it gets close the the benefit of reachability analysis at
very nearly no cost.
|
|
|
|
|
|
|
|
|
|
|
| |
By default we run par test under -optimise. But occasionally we need
to test optimizations in isolation. This commit adds a Ynooptimise
flag that turns the optimize flags off back off after they've been
turned on.
A test is included to ensure that -Ynooptimise turns off optimizations
and an existing test is modified to show that optimizations coming
after -Ynooptimise in command line are enabled.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
What would you prefer?
adaptToMemberWithArgs(tree, qual, name, mode, false, false)
Or:
adaptToMemberWithArgs(tree, qual, name, mode, reportAmbiguous = false, saveErrors = false)
|
|\
| |
| | |
Integrate range positions.
|
| |
| |
| |
| |
| |
| |
| | |
One of those eternal headaches which probably sounded better
on paper. Even before range positions are the default, there's
no reason we can't have the range position code available
in all globals enabled via settings, just like everything else.
|
| |
| |
| |
| |
| |
| |
| | |
This is a stepping stone to having range positions all the
time, as well as to modularizing the presentation compiler.
It does not enable range positions by default, only places
them smoewhere where they can be.
|
|\ \
| | |
| | | |
Require firstKey and lastKey on IntMap tail-recursive.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Changes around lint
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
imports to Analyzer. This allows the check to be used in the IDE.
|
|\ \ \ \
| | | | |
| | | | | |
SI-7132 - don't discard Unit type in interpreter
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-6816 Deprecate -Yeta-expand-keeps-star
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit deprecates the -Yeta-expand-keeps-star flag. It was created
in 2.10 to help in the transition from 2.9 but by the time 2.11 comes
out it should no longer be necessary.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Making the mechanisms more apparent. Renamed to isHKSubType,
because there is no other.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
These super-mutation-oriented methods should enthusiastically
communicate what they are doing, especially when they encounter
anything unexpected. None of this work should be taken as an
endorsement of any of the worked-upon code.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Lowering the barriers to sensible logging - these methods are
key in avoiding the "too much trouble" syndrome.
|
| |_|_|/
|/| | | |
|
|\ \ \ \
| | | | |
| | | | | |
Renamed type param to be consistent with convention.
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It's super confusing to see debugging output showing
a type constructor called "Coll". The convention in the
collections is that CC[A] takes type parameters and
Coll is an alias for the applied type.
|
|\ \ \ \
| |/ / /
|/| | | |
Refactors AsSeenFromMap to expose extension point.
|
| | | |
| | | |
| | | |
| | | | |
Added explanatory comment.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The extension point was the initial motivation but I also tried to
bring some clarity to the internals. This is a setup commit for
scaladoc and interactive modularization, and also will be followed
by a fix for abstract types losing their prefixes (SI-6161.)
|
|\ \ \ \
| |/ / /
|/| | | |
Merge 2.10.1 into master
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Conflicts:
src/compiler/scala/tools/nsc/ast/Trees.scala
src/library/scala/concurrent/impl/ExecutionContextImpl.scala
|
| | |\ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We actually need to call normalize here, otherwise we don't
progress through #1 below.
[infer implicit] scala.this.Predef.implicitly[Higher[Foo.Bar]] with pt=Higher[Foo.Bar] in object Foo
1. tp=Foo.Bar tp.normalize=[A <: <?>]Foo.Bar[A] tp.dealias=Foo.Bar
2. tp=Foo.Bar[A] tp.normalize=Box[A] tp.dealias=Box[A]
|
| | | |\ \ \
| | | | | | |
| | | | | | | |
SI-7163 backport of annotated retyping to 2.10.1
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
typedAnnotated transforms an Annotated tree into a Typed tree. The
original field of the result is set to the Annotated tree.
The bug was that typedAnnotated was using the untyped Annotated tree
as original, but also set its type. When re-typing later on the same
Annotated tree, the typer would consider it as alreadyTyped. This
is incorrect, the typer needs to convert Annotated trees to Typed.
Also, the Annotated tree only had its type field set, but its children
were still untyped. This crashed the compiler lateron, non-typed trees
would get out of the typing phase.
|
| | | |\ \ \ \
| | | | | | | |
| | | | | | | | |
SI-6576 Workaround / diagnostic for IDE NPE.
|
| | | | |/ / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Seems like this was too optimistic:
> // later by lukas: disabled when fixing SI-5975
> // i think it cannot happen anymore
- restored the null check
- added logging when we set the namer in this attachment,
in the hope of spotting a pattern in the wild.
We don't have a test case yet; if we did we could most likely
have a more principled fix. But this should suffice for 2.10.1.
|
| | | | | | | |
|
| | | |/ / / |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This reverts commit 08ab007c5c97f153902c4ac58f87e30fbf7cf99f.
This is necessary to maintain binary compatibility with 2.10.0.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This reverts commit bdff881f8a15d4de0c0ff2aa2427f0d8244d2d42.
This is necessary to maintain binary compatibility with 2.10.0.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This reverts commit 54a84a36d5b435a787d93ca48d45399136c7e162.
This is necessary to maintain binary compatibility with 2.10.0.
run/t6989.check had to be updated as it also (indirectly) tested SI-6548
Conflicts:
test/files/lib/javac-artifacts.jar.desired.sha1
test/files/run/t6548.check
test/files/run/t6548/Test_2.scala
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This reworks 02ed5fb so that we don't change JavaUniverse's super classes.
This is necessary to maintain binary compatibility with 2.10.0.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This reverts commit 0429f0fd9224499cd8b606490d04b1a8dcffbca8.
This is necessary to maintain binary compatibility with 2.10.0.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Inlined AdaptedForkJoinTask, made uncaughtExceptionHandler private[this].
This is necessary to maintain binary compatibility with 2.10.0.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is necessary to maintain binary compatibility with 2.10.0.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is necessary to maintain binary compatibility with 2.10.0.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Reworks d526f8bd74.
This is necessary to maintain binary compatibility with 2.10.0.
matchName="scala.collection.mutable.MutableList.tailImpl"
problemName=MissingMethodProblem
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Also revert "SI-4664 [Make scala.util.Random Serializable] Add test case"
This reverts commit 0b92073a38f9d1823f051ac18173078bfcfafc8a.
This reverts commit 2aa66bec86fd464712b0d15251cc400ff9d52821.
This is necessary to maintain binary compatibility with 2.10.0.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This reverts commit a557a973608a75c7a02f251bbcf49fe6f6b6655e.
This is necessary to maintain binary compatibility with 2.10.0.
Mima says:
matchName="scala.collection.immutable.Range.head"
problemName=IncompatibleResultTypeProblem
The bridge method appeared because result is now Int, whereas
the super-method's result type erases to Object
|
| | |\ \ \ \
| | | | | | |
| | | | | | | |
resetAttrs now always erases This.tpe
|
| | | | | | | |
|