| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The exhaustivity checks in the pattern matcher build a propositional
formula that must be converted into conjunctive normal form (CNF) in
order to be amenable to the following DPLL decision procedure.
However, the simple conversion into CNF via negation normal form and
Shannon expansion that was used has exponential worst-case complexity
and thus even simple problems could become untractable.
A better approach is to use a transformation into an _equisatisfiable_
CNF-formula (by generating auxiliary variables) that runs with linear
complexity. The commonly known Tseitin transformation uses bi-
implication. I have choosen for an enhancement: the Plaisted
transformation which uses implication only, thus the resulting CNF
formula has (on average) only half of the clauses of a Tseitin
transformation.
The Plaisted transformation uses the polarities of sub-expressions to
figure out which part of the bi-implication can be omitted. However,
if all sub-expressions have positive polarity (e.g., after
transformation into negation normal form) then the conversion is
rather simple and the pseudo-normalization via NNF increases chances
only one side of the bi-implication is needed.
I implemented only optimizations that had a substantial
effect on formula size:
- formula simplification, extraction of multi argument operands
- if a formula is already in CNF then the Tseitin/Plaisted
transformation is omitted
- Plaisted via NNF
- omitted: (sharing of sub-formulas is also not implemented)
- omitted: (clause subsumption)
|
|
|
|
| |
Signed-off-by: Gerard Basler <gerard.basler@gmail.com>
|
|
|
|
| |
Remove redundant UniqueSym class.
|
|\
| |
| | |
Bump version to 2.11.5 in build.number file.
|
| |
| |
| |
| |
| | |
Scala 2.11.4 release has been staged, we should start publishing snapshots
for Scala 2.11.5 now.
|
|\ \
| | |
| | | |
Delete zipfile-bug.txt
|
| | |
| | |
| | | |
The observed bug is probably solved (or should have a ticket), this 4-year-old thread dump does not seem to belong here.
|
|\ \ \
| |/ /
|/| /
| |/ |
Bump version number in build.number to 2.11.4
|
|/
|
|
|
|
| |
This should happen every time we cut a new release. We don't touch
versions.properties files because that file specifies dependencies and
we don't want to depend on broken Scala 2.11.3 release.
|
|\
| |
| | |
SI-8900 Don't assert !isDelambdafyFunction, it may not be accurate
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The implementations of isAnonymousClass, isAnonymousFunction,
isDelambdafyFunction and isDefaultGetter check if a specific substring
(eg "$lambda") exists in the symbol's name.
SI-8900 shows an example where a class ends up with "$lambda" in its
name even though it's not a delambdafy lambda class. In this case the
conflict seems to be introduced by a macro. It is possible that the
compiler itself never introduces such names, but in any case, the
above methods should be implemented more robustly.
This commit is band-aid, it fixes one specific known issue, but there
are many calls to the mentioned methods across the compiler which
are potentially wrong.
Thanks to Jason for the test case!
|
|\ \
| | |
| | | |
SI-8926 default visbility RUNTIME for java annotations
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When parsed from source, java annotation class symbol are lacking the
`@Retention` annotation. In mixed compilation, java annotations are
therefore emitted with visibility CLASS.
This patch conservatively uses the RUNTIME visibility in case there is
no @Retention annotation.
The real solution is to fix the Java parser, logged in SI-8928.
|
|\ \
| | |
| | | |
[nomerge] SI-8899 Revert "SI-8627 make Stream.filterNot non-eager"
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 9276a1205f74fdec74206209712831913e93f359.
The change is not binary compatible, See discussion on SI-8899. Making
filterImpl non-private changes its call-sites (within TraversableLike)
from INVOKESTATIC to INVOKEINTERFACE. Subclasses of TraversableLike
compiled before this change don't have a mixin for filterImpl.
|
|\ \
| |/
|/| |
SI-8907 Don't force symbol info in isModuleNotMethod
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test case by Jason.
RefChecks adds the lateMETHOD flag lazily in its info transformer.
This means that forcing the `sym.info` may change the value of
`sym.isMethod`.
0ccdb151f introduced a check to force the info in isModuleNotMethod,
but it turns out this leads to errors on stub symbols (SI-8907).
The responsibility to force info is transferred to callers, which
is the case for other operations on symbols, too.
|
|\
| |
| | |
Minor spelling corrections and fix of the claimed outcome of the examples in the section on repeated parameters
|
| |
| |
| | |
Reverted the claimed result values of the example in the section on repeated parameters and changed the code of the example method instead.
|
| |
| |
| | |
Changed "in" to "by the".
|
| |
| |
| | |
Changed two wrong plurals to singulars, and inserted a comma in an enumeration of alternatives before the last "or".
|
| |
| |
| |
| | |
Elided superfluous "a".
Corrected "no" to "not".
|
| |
| |
| |
| | |
Inserted two missing instances of the word "the".
Corrected "invokeDynamic" to "applyDynamic".
|
| |
| |
| | |
Corrected the claimed outcome of the example in the section on repeated parameters. The example method sum sums up the _squares_ of the arguments.
|
| |
| |
| | |
Inserted missing word "bounds".
|
| |
| |
| | |
Fixed typo.
|
| |
| |
| | |
Fixed typo.
|
|\ \
| | |
| | | |
SI-8894 dealias when looking at tuple components
|
| |/
| |
| |
| |
| |
| |
| | |
Classic bait-and-switch: `isTupleType` dealiases, but `typeArgs` does not.
When deciding with `isTupleType`, process using `tupleComponents`.
Similar for other combos. We should really enforce this using extractors,
and only decouple when performance is actually impacted.
|
|\ \
| | |
| | | |
Color REPL under -Dscala.color
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
* Errors are red
* Warnings are yellow
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We already use -Dscala.color when using -Ytyper-debug
This tries to reuse the colors chosen from the debug flag:
* Bold blue for vals (e.g. "res0")
* Bold green for types (e.g. "Int")
* Magenta for the shell prompt (e.g. "scala>")
|
|\ \ \
| |_|/
|/| | |
SI-8890 handle reference to overload with error
|
|/ /
| |
| |
| |
| |
| |
| | |
When buffering, we must report the ambiguity error to avoid a stack overflow.
When the error refers to erroneous types/symbols,
we don't report it directly to the user,
because there will be an underlying error that's the root cause.
|
|\ \
| | |
| | | |
Make Scaladoc actually exit with non-zero exit code in case of errors, as its docs say it does
|
| | |
| | |
| | |
| | | |
as its docs say it does.
|
|\ \ \
| | | |
| | | | |
SI-4788/SI-5948 Respect RetentionPolicy of Java annotations
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Note that I removed the check to ignore @deprecated:
- @deprecated extends StaticAnnotation, so they aren't
supposed to show up in the RuntimeInvisibleAnnotation
attribute anyway, and the earlier check for "extends
ClassfileAnnotationClass" makes this check superflous
anyway.
- Otherwise, if @deprecated was extending
ClassfileAnnotationClass it would seem inconsistent
that we don't emit @deprecated, but would do so for
@deprecatedOverriding, @deprecatedInheritance, etc.
Anyway, due to ClassfileAnnotation not working in
Scala, and the additional check which only allows
Java-defined annotations, this is pretty pointless
from every perspective.
|
|\ \ \ \
| |/ / /
|/| | | |
Avoid ClassfileAnnotation warning for @SerialVersionUID
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
@SerialVersionUID is special-cased, the warning doesn't apply.
Related to SI-7041.
|
|\ \ \
| | | |
| | | | |
SI-8843 AbsFileCL acts like a CL
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Let the AbstractFileClassLoader override just the usual suspects.
Normal delegation behavior should ensue.
That's instead of overriding `getResourceAsStream`, which was intended
that "The repl classloader now works more like you'd expect a classloader to."
(Workaround for "Don't know how to construct an URL for something which exists
only in memory.")
Also override `findResources` so that `getResources` does the obvious thing,
namely, return one iff `getResource` does.
The translating class loader for REPL only special-cases `foo.class`: as
a fallback, take `foo` as `$line42.$read$something$foo` and try that class file.
That's the use case for "works like you'd expect it to."
There was a previous fix to ensure `getResource` doesn't take a class name.
The convenience behavior, that `classBytes` takes either a class name or a resource
path ending in ".class", has been promoted to `ScalaClassLoader`.
|
|\ \ \ \
| | | | |
| | | | | |
Update stripPrefix/StringLike docs to talk about no op case
|
| | | | |
| | | | |
| | | | |
| | | | | |
Incorporate review comments by Som Snytt.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-6502 Repl reset/replay take settings args
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The reset and replay commands take arbitrary command line args.
When settings args are supplied, the compiler is recreated.
For uniformity, the settings command performs only the usual
arg parsing: use -flag:true instead of +flag, and clearing a
setting is promoted to the command line, so that -Xlint: is not
an error but clears the flags.
```
scala> maqicode.Test main null
<console>:8: error: not found: value maqicode
maqicode.Test main null
^
scala> :reset -classpath/a target/scala-2.11/sample_2.11-1.0.jar
Resetting interpreter state.
Forgetting all expression results and named terms: $intp
scala> maqicode.Test main null
Hello, world.
scala> val i = 42
i: Int = 42
scala> s"$i is the loneliest numbah."
res1: String = 42 is the loneliest numbah.
scala> :replay -classpath ""
Replaying: maqicode.Test main null
Hello, world.
Replaying: val i = 42
i: Int = 42
Replaying: s"$i is the loneliest numbah."
res1: String = 42 is the loneliest numbah.
scala> :replay -classpath/a ""
Replaying: maqicode.Test main null
<console>:8: error: not found: value maqicode
maqicode.Test main null
^
Replaying: val i = 42
i: Int = 42
Replaying: s"$i is the loneliest numbah."
res1: String = 42 is the loneliest numbah.
```
Clearing a clearable setting:
```
scala> :reset -Xlint:missing-interpolator
Resetting interpreter state.
scala> { val i = 42 ; "$i is the loneliest numbah." }
<console>:8: warning: possible missing interpolator: detected interpolated identifier `$i`
{ val i = 42 ; "$i is the loneliest numbah." }
^
res0: String = $i is the loneliest numbah.
scala> :reset -Xlint:
Resetting interpreter state.
Forgetting this session history:
{ val i = 42 ; "$i is the loneliest numbah." }
scala> { val i = 42 ; "$i is the loneliest numbah." }
res0: String = $i is the loneliest numbah.
```
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
People expect to change the class path midstream.
Let's disabuse them by removing the broken command.
The internals are deprecated.
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
SI-8731 warning if @switch is ignored
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
For matches with two or fewer cases, @switch is ignored. This should
not happen silently.
|