| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
partest has custom code for -Xplugin handling (see
DirectCompiler.updatePluginPath for details). that code has its own
idea of what the syntax of -Xplugin is, different from Scalac's.
partest's idea is that multiple paths should be separated by the
platform classpath separator character, so : on Unix and ; on Windows.
the .flags file here was using a colon, and that confuses partest on
Windows, since partest was expecting a semicolon.
it might be nice to fix partest to accept comma as the separator
instead, which is standard for a scalac MultiStringSetting such
as -Xplugin. but it turns out we have an out: we can just provide
multiple -Xplugin flags.
what evidence do I have that this is the right change?
* the test still passes on both Windows and Mac OS X (manually
tested); if Travis likes it, we'll know it passes on Linux too
* I tried reverting Som's fix for SI-9370 (c32ba93) and the test failed,
as expected, both with and without my change
* I added a bunch of debugging output to
DirectCompiler.updatePluginPath in partest, built a new partest jar,
and used it to run the test on Windows with and without my fix, and
verified by eye that the logic there was operating as expected in
both cases
and in conclusion, for Som's benefit: <insert cryptic joke here>
|
| |
| |
| |
| | |
Such that uncurry can correctly un-dependify them.
|
| |\
| | |
| | | |
unset inappropriate execute bits
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I imagine these date back to old Subversion days and are probably the
result of inadvertent commits from Windows users with vcs client
configs.
having the bit set isn't really harmful most of the time,
but it's just not right, and it makes the files stand out in directory
listings for no reason
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A previous optimization (d44a86f432a7f9ca250b014acdeab02ac9f2c304) for
pattern matcher exhaustivity checks used a smarter encoding to ensure
that the scrutinee can be equal to one child only.
However, in case of traits between the root and leave type, a child can
be of several types and these types should not be in a mutually exclusive
group. A simple solution (hat tip to retronym) is to just put traits
and classes into separate groups.
|
| |\ \
| | | |
| | | | |
SI-9442 Fix the uncurry-erasure types
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Using the "uncurry-erased" type (the one after the uncurry phase) can
lead to incorrect tree transformations. For example, compiling:
```
def foo(c: Ctx)(l: c.Tree): Unit = {
val l2: c.Tree = l
}
```
Results in the following AST:
```
def foo(c: Ctx, l: Ctx#Tree): Unit = {
val l$1: Ctx#Tree = l.asInstanceOf[Ctx#Tree]
val l2: c.Tree = l$1 // no, not really, it's not.
}
```
Of course, this is incorrect, since `l$1` has type `Ctx#Tree`, which is
not a subtype of `c.Tree`.
So what we need to do is to use the pre-uncurry type when creating
`l$1`, which is `c.Tree` and is correct. Now, there are two
additional problems:
1. when varargs and byname params are involved, the uncurry
transformation desugares these special cases to actual
typerefs, eg:
```
T* ~> Seq[T] (Scala-defined varargs)
T* ~> Array[T] (Java-defined varargs)
=>T ~> Function0[T] (by name params)
```
we use the DesugaredParameterType object (defined in
scala.reflect.internal.transform.UnCurry) to redo this desugaring
manually here
2. the type needs to be normalized, since `gen.mkCast` checks this
(no HK here, just aliases have to be expanded before handing the
type to `gen.mkAttributedCast`, which calls `gen.mkCast`)
|
| |\ \ \
| | |_|/
| |/| | |
SI-6636 Fix macro expansion in toolboxes
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Some extra synthetic code generated under this mode failed to escape
input before adding it to a literal string. It used to get away with
this most of the time by triple quoting the literal.
This commit reuses Scala string escaping logic buried in `Constant`
to do this properly. Actually, the proper approach would be to build
the synthetic code with trees and quasiquotes, and avoid the mess
of stringly-genererated code.
I threw in some defensive hygiene for the reference to `Nil` while
I was in the neighbourhood.
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
Inliner heuristic for higher-order methods
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When invoking a higher-order method and the value passed for the
SAM type is either a function literal or a parameter of the callsite
method, inline the higher-order method into the callee.
This is a first version, the heuristics will be refined further.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Handler tables are lists of tuples (try-start, try-end,
handler-start, exception-type). When an instruction throws, the first
handler in the list that covers the instruction and matches the type
is executed. For nested handlers, it is the job of the compiler to
add them to the handler table in the correct order.
When inlining a method, the handlers of the callee are prepended to
the list of handlers in the callsite method. This ensures that the
callee's handlers are tested first if an exception is thrown in the
inlined code.
|
| | | | |
| | | | |
| | | | |
| | | | | |
The new optimizer doesn't have this problem.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-9473 Cleaner references to statically owned symbols
|
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Ever wonder why `identity("")` typechecks to
`scala.this.Predef.identity("")`?
It turns out that `mkAttributedRef` was importing
`q"$scalaPackageClass.this.Predef._"` for all these years,
rather than `q"$scalaModule.Predef._"`.
This commit makes `mkAttributedRef` special case static owners
by referring the the corresponding module, instead.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
One shouldn't base any decisions of the owner of an overloaded
symbol. Instead, the owner of each of the alternatives should
be considered.
This gotcha is super easy to forget, as I did with my change to
simplify the way we detect whether we need to add the `.package`
prefix to a tree.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Include owner in ErrorNonExistentField message
|
| | |/ / /
| |/| | |
| | | | |
| | | | | |
This should be particularly helpful for synthetic field names like `evidence$21`.
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
Preparation for using default methods in traits
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The term "specialized override" is used to describe a method
in a synthetic specialized subclass that generically substitutes
the specialized type args into the siganture of a generic method.
For example, `trait T[@spec A] { def t(a: A) }` gives rise to
`def t(a: Int)` under the type environment `A=Int`.
This commit avoids doing this for specialized traits, only classes
have these overrides now. The motivation is to make it simpler to
use specialized interfaces (like `T$mcI$sp` from the example above)
as Java functional interfaces.
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
A deferred method in the generic interface ends up with a
corresponding, generically substituted version in the specialized
sub interface.
This is superfluous and problematic when we start adding default
methods to the interfaces. The subsequent commit will remove them.
|
|\ \ \ \
| | | | |
| | | | | |
Merge 2.11.x into 2.12.x [ci: last-only]
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
only trivial merge conflicts here.
not dealing with PR #4333 in this merge because there is a substantial
conflict there -- so that's why I stopped at
63daba33ae99471175e9d7b20792324615f5999b for now
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
SI-7155 Remove deprecated private s.c.m.AVLTree
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-9375 add synthetic readResolve only for static modules
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
For inner modules, the synthetic readResolve method would cause the
module constructor to be invoked on de-serialization in certain
situations. See the discussion in the ticket.
Adds a comprehensive test around serializing and de-serializing
modules.
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
SI-6806 Add an @implicitAmbiguous annotation
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Example usage:
trait =!=[C, D]
implicit def neq[E, F] : E =!= F = null
@annotation.implicitAmbiguous("Could not prove ${J} =!= ${J}")
implicit def neqAmbig1[G, H, J] : J =!= J = null
implicit def neqAmbig2[I] : I =!= I = null
implicitly[Int =!= Int]
Which gives the following error:
implicit-ambiguous.scala:9: error: Could not prove Int =!= Int
implicitly[Int =!= Int]
^
Better than what was previously given:
implicit-ambiguous.scala:9: error: ambiguous implicit values:
both method neqAmbig1 in object Test of type [G, H, J]=> Main.$anon.Test.=!=[J,J]
and method neqAmbig2 in object Test of type [I]=> Main.$anon.Test.=!=[I,I]
match expected type Main.$anon.Test.=!=[Int,Int]
implicitly[Int =!= Int]
^
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-6810 Disallow EOL in char literal
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
It's clear that char literals are one-lined like normal
string literals.
By the same token, pun intended, char literals accept
unicode escapes the same as string literals, including
`\u000A`.
This commit adds the usual exclusions (CR, NL, SU).
The spec is outdated in outlawing chars that are not
"printable", in particular, the ASCII control codes.
The original intention may have been that the ordinary
string escapes are required, such as "\b\n". Note that
some common escapes are absent, such as "\a".
|
|\ \ \ \ \ \ \
| |_|_|_|/ / /
|/| | | | / /
| | |_|_|/ /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
all conflicts were because the changes changed code that
doesn't exist anymore in 2.12; they were resolved with
`git checkout --ours`
c201eac changed bincompat-forward.whitelist.conf but
I dropped the change in this merge because it refers
to AbstractPromise which no longer exists in 2.12
|
| | |_|_|/
| |/| | | |
|
| |\ \ \ \
| | | | | |
| | | | | | |
SI-1931 Hide Predef.any2stringadd in REPL
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
User imports that reference Predef are relocated to the top of
the wrapping template so that they can hide implicits defined
in Predef.
Only one import from Predef is retained for special treatment.
This is simple and sane. The test shows that `import Predef._`
restores Predef implicits even if a user-defined term would
normally be in scope.
A smart `:import` command to turn off or quarantine imports explicitly
would allow fine-grained control.
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
SI-9425 Leave Companion.apply if constructor is less accessible
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Calls to synthetic case class apply methods are inlined to the
underlying constructor invocation in refchecks.
However, this can lead to accessibility errors if the constructor
is private.
This commit ensures that the constructor is at least as accessible
as the apply method before performing this tranform.
I've manually checked that other the optimization still works in other
cases:
scala> class CaseApply { Some(42) }
defined class CaseApply
scala> :javap -c CaseApply
Compiled from "<console>"
public class CaseApply {
public CaseApply();
Code:
0: aload_0
1: invokespecial #9 // Method java/lang/Object."<init>":()V
4: new #11 // class scala/Some
7: dup
8: bipush 42
10: invokestatic #17 // Method scala/runtime/BoxesRunTime.boxToInteger:(I)Ljava/lang/Integer;
13: invokespecial #20 // Method scala/Some."<init>":(Ljava/lang/Object;)V
16: pop
17: return
}
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-6938 Use mutable red-black tree in `mutable.TreeSet`
|
| | |_|_|_|/ /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The previous implementation of `mutable.TreeSet` uses a mutable reference to an immutable red-black tree as its underlying data structure. That leads to unnecessary objects being created, which can be a problem in systems with limited resources. It also has reduced performance when compared with common mutable implementations.
In this commit `mutable.TreeSet` is changed so that it uses the recently created `mutable.RedBlackTree` as its underlying data structure. Specialized red-black tree methods were created for working with keys for efficiency reasons. The new implementation is source-compatible with the previous one, although its serialized representation obviously changes.
Closes [SI-6938](https://issues.scala-lang.org/browse/SI-6938).
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-8554 Two-arg remove now throws exception on overly-large count
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
ListBuffer now throws exceptions like other buffers do when trying to index out of range.
Also harmonized the order of testing (`count < 0` tested before `n` in range).
Test in scala-collection-laws (gated by SI8554 flag). Also modified test in run/t6634.scala
|
|\ \ \ \ \ \ \ \
| |_|/ / / / / /
|/| | / / / / /
| | |/ / / / /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Transcript:
```
➜ scala git:(2.12.x) export MB=$(git merge-base 2.12.x 2.11.x)
➜ scala git:(2.12.x) echo $MB
0e9525aa618a2eca143a1c7379ff1e6efd23b86e
➜ scala git:(2.12.x) g log --oneline --graph $MB...2.11.x
```
Read this upside down :-). The last merge comes first,
with merge commands interspersed in the git log.
```
➜ scala git:(2.12.x) g merge 2.11.x
Auto-merging versions.properties
Auto-merging src/reflect/scala/reflect/internal/pickling/UnPickler.scala
Auto-merging src/reflect/scala/reflect/internal/Types.scala
Auto-merging src/reflect/scala/reflect/internal/TreeGen.scala
Auto-merging src/library/scala/collection/immutable/Stream.scala
Auto-merging src/library/scala/collection/convert/Wrappers.scala
Auto-merging build.xml
CONFLICT (content): Merge conflict in build.xml
Auto-merging README.md
Automatic merge failed; fix conflicts and then commit the result.
```
```
* 928e6892d4 (scala/2.11.x, 2.11.x) Merge pull request #4682 from adriaanm/jline-quick.bin
|\
| * b763dbf368 (adriaanm/jline-quick.bin, jline-quick.bin) Include jline on quick.bin tool path
* | ccded7d179 Merge pull request #4680 from janekdb/2.11.x-option
|\ \
| |/
|/|
| * 58ae3e51f7 Delegate null test to Option
|/
* a745f06e35 Merge pull request #4670 from retronym/ticket/9422
|\
| * ec95e534a2 SI-9422 Fix incorrect constant propagation
* 65fa73dff3 Merge pull request #4669 from janekdb/2.11.x-scaladoc-reflect
|\
| * e206a1837d ScalaDoc fixes for reflect
* | 8e7e3b4a5f Merge pull request #4667 from janekdb/2.11.x-scaladoc-library-library-aux
|\ \
| |/
|/|
| * 69c2c106fe ScalaDoc fixes for library and library-aux
* | 7de4cbc5e5 Merge pull request #4665 from lrytz/asm-504-3
|\ \
| * | cdc55c29d0 Upgrade scala-asm to 5.0.4-scala-3
|/ /
* | d8da39a197 Merge pull request #4661 from retronym/ticket/9365
|\ \
| * | 0c99742c51 SI-9365 Don't null out dependencies of transient lazy vals
| /
* | 2279d3f3d9 Merge pull request #4662 from janekdb/2.11.x-redundant-val-modifier
|\ \
| * | 173a6fad95 Remove redundant 'val' from case class params.
* | | e0d21432d6 Merge pull request #4664 from SethTisue/remove-dead-link-in-readme
|\ \ \
| |_|/
|/| |
| * | 600fc4e6e1 fix readme for death of typesafe.artifactoryonline.com
| |/
* | 7492bda816 Merge pull request #4636 from SethTisue/contributor-stuff-from-github-wiki
|\ \
| |/
|/|
| * ed5098dbc4 merge two reviewers lists in readme
| * e136e4ad47 tighten up CONTRIBUTING.md a little
| * f9ca6863d4 readme/contributor's guide tweaks
| * 80e98b03a1 tiny readme fix
| * 197845620c merge in text from pull request policy from old wiki
| * e93ca409ae drop in pull request policy from old wiki
| * 951939d1b3 contributor guide: add a morsel salvaged from GitHub wiki
* f682441f6f Merge pull request #4653 from lrytz/t9403
|\
| * 2678d349b2 SI-9403 fix ICodeReader for negative BIPUSH / SIPUSH values
```
```
➜ scala git:(2.12.x) g merge -s ours f2d7838d90
Merge made by the 'ours' strategy.
```
```
* f2d7838d90 Merge pull request #4657 from lrytz/backports
|\
| * 241bb9ac19 Rename the ENUM / DEFAULTMETHOD flags to include JAVA_
| * 7a7f9927c3 SI-9393 fix modifiers of ClassBTypes for Java annotations
| * 8946d60bd2 [backport] Fix bytecode stability when running the closure optimizer
| * 3b6b2bfe9f [backport] SI-9392 Clarify the workaround comment and introduce a devWarning
| * 091c1e6ed8 [backport] SI-9392 Avoid crash in GenBCode for incoherent trees
| * 6177cb4481 [backport] SI-9393 Temporarily disable two assertions in GenBCode
| * a1d471f7ba [backport] Refactor the ClosureOptimizer, run ProdCons only once per method
| * f5e72765f2 [backport] SI-9387 Fix VerifyError introduced by indylambda
| * 41b99e2531 [backport] Integrate the LMFInvokeDynamic extractor into LambdaMetaFactoryCall
| * fc1cda2118 [backport] Small refactoring to the closure optimizer
| * 8f272c0ad2 [backport] Accessibility checks for methods with an InvokeDynamic instruction
| * 1c1d8259b5 [backport] Fix bytecode stability
| * ef9d845676 [backport] Support methodHandle / invokeDynamic constant pool entries in scalap
| * 60747c7555 [backport] Skip mirror class when invoking deserializeLambda
| * 404e86239e [backport] Prevent infinite recursion in ProdConsAnalyzer
| * 1b0703e74d [backport] SI-9376 don't crash when inlining a closure body that throws.
| * e511375a90 [backport] Fix superclass for Java interface symbols created in JavaMirrors
| * 1b57723169 [backport] `deserializeLambda` should not use encoded class name
| * 8bafa8ed88 [backport] Java parser: default methods in interfaces are not `DEFERRED`
| * 44e2761a9b [backport] SI-6613 fixed in GenBCode
```
```
➜ scala git:(2.12.x) g merge 4c6dcfe934
Auto-merging src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala
Auto-merging doc/License.rtf
Auto-merging doc/LICENSE.md
Auto-merging build.xml
Auto-merging build.sbt
Merge made by the 'recursive' strategy.
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
build.sbt | 2 +-
build.xml | 2 +-
doc/LICENSE.md | 4 ++--
doc/License.rtf | 4 ++--
src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala | 2 +-
src/scalap/decoder.properties | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
```
```
* | 4c6dcfe934 Merge pull request #4656 from lrytz/filtersOpenJDK
|\ \
| |/
|/|
| * 0b35bc29aa Ignore OpenJDK warnings in partest filters
* 6eb0812050 Merge pull request #4644 from SethTisue/copyright-2015
* e0aac7c9ef bump copyright year to 2015
```
|
| |\ \ \ \ \ \
| | |_|/ / / /
| |/| | | | | |
SI-9422 Fix incorrect constant propagation
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The ConstantOptimization phase uses abstract interpretation
to track what is known about values, and then to use this information
to optimize away tests with a statically known result.
Constant propagation was added under -optimize in Scala 2.11.0-M3, in
PR #2214.
For example, we might know that a variable must hold one of a set
of values (`Possible`). Or, we could track that it must *not*
be of of a set of value (`Impossible`).
The test case in the bug report was enough to create comparison:
v1 == v2 // where V1 = Possible(Set(true, false))
// V2 = Possible(Set(true, false))
This test was considered to be always true, due to a bug in
`Possible#mightNotEqual`. The only time we can be sure that
`Possible(p1) mightNotEquals Possible(p2)` is if
`p1` and `p2` are the same singleton set. This commit changes
this method to implement this logic.
The starting assumption for all values is currently
`Impossible(Set())`, although it would also be reasonable to represent
an unknown boolean variable as `Possible(Set(true, false))`, given
the finite and small domain.
I tried to change the starting assumption for boolean locals in
exactly this manner, and that brings the bug into sharp focus.
Under this patch:
https://github.com/retronym/scala/commit/e564fe522d
This code:
def test(a: Boolean, b: Boolean) = a == b
Compiles to:
public boolean test(boolean, boolean);
Code:
0: iconst_1
1: ireturn
Note: the enclosed test case does not list `-optimize` in a `.flags`
file, I'm relying on that being passed in by the validation build.
I've tested locally with that option, though.
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-9365 Don't null out dependencies of transient lazy vals
|