| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |\ \ \ \ \ \ \ \
| | |_|_|/ / / / /
| |/| | | | | | | |
SI-9181 Exhaustivity checking does not scale (regression)
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Tseitin's transformation, e.g., use
`CNF(P1 /\ ... /\ PN) == CNF(P1) ++ CNF(...) ++ CNF(PN)`
in order to simplify the resultung formula.
|
| | | |_|/ / / /
| | |/| | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
reachability analysis are too big to be solved in reasonable time, then we skip
the analysis. I also cleaned up warnings.
Why did `t9181.scala` work fine with 2.11.4, but is now running out of memory?
In order to ensure that the scrutinee is associated only with one of the 400
derived classes we add 400*400 / 2 ~ 80k clauses to ensure mutual exclusivity.
In 2.11.4 the translation into CNF used to fail, since it would blow up already
at this point in memory. This has been fixed in 2.11.5, but now the DPLL solver
is the bottleneck.
There's a check in the search for all models (exhaustivity) that it would avoid
a blow up, but in the search for a model (reachability), such a check is
missing.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The selector has been wrong since 0c2614e.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-8336: add `fold` & `toEither` to `util.Try`
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
`res.fold(fa, fb)` evaluates to `fa(e)` if `res` is a `Failure(e)`,
or `fb(value)` if `res` is a `Success(value)`.
(If `fb` throws an exception `e` when applied, `fa(e)`.)
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Don't define the wiki syntax in multiple places
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
DocComments#expandWiki() had been used by DocComments#toJavaDoc before,
but the latter was removed by #3004.
Based on GitHub (yeah, it's wild guess), we don't have any external
cosumers other than that.
https://github.com/search?l=scala&q=expandWiki+-filename%3ADocComments&ref=searchresults&type=Code&utf8=%E2%9C%93
|
|\ \ \ \ \ \ \ \ \ \
| |_|/ / / / / / / /
|/| | | | | | | | | |
Merge/2.11 to 2.12 apr 1
|
| |\ \ \ \ \ \ \ \ \
| | | |/ / / / / / /
| | |/| | | | | | | |
|
| | |\ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
SI-8731 don't issue a @switch warning for two-case matches
|
| | | | |_|_|/ / / /
| | | |/| | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
This allows annotating small pattern matches with `@switch` without
getting any warnings. There's no reason to warn, the performance of
the generated bytecode is good.
|
| | |\ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
ScalaDoc typo
|
| | | | |_|_|_|/ / /
| | | |/| | | | | | |
|
| | |\ \ \ \ \ \ \ \
| | | |_|_|_|_|/ / /
| | |/| | | | | | | |
SI-8861 Handle alias when probing for Any
|
| | | | |_|_|/ / /
| | | |/| | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
If args to a method are alias types, dealias to see if they
contain Any before warning about inferring it. Similarly for
return and expected types.
|
| | |\ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Remove deprecation warnings
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
- Added `since` to deprecation statement
- Added unit to parameter list
- Removed usage of deprecated method polyType
- Replaced deprecated `debugwarn` with `devWarning`
- Changed switch statement to if else in order to remove a warning
- Switched implementation of `init` and `processOptions` to prevent
warning
- Replaced deprecated `Console.readLine` with `scala.io.StdIn.readLine`
- Replaced deprecated `startOrPoint` with `start`
- Replaced deprecated `tpe_=` with `setType`
- Replaced deprecated `typeCheck` with `typecheck`
- Replaced deprecated `CompilationUnit.warning` with `typer.context.warning`
- Replaced deprecated `scala.tools.nsc.util.ScalaClassLoader` with `scala.reflect.internal.util.ScalaClassLoader`
- Replaced deprecated `scala.tools.ListOfNil` with `scala.reflect.internal.util.ListOfNil`
- Replaced deprecated `scala.tools.utils.ScalaClassLoader` with `scala.reflect.internal.util.ScalaClassLoader`
- Replaced deprecated `emptyValDef` with `noSelfType`
- In `BoxesRunTime` removed unused method and commented out unused values. Did not delete to keep a reference to the values. If they are deleted people might wonder why `1` and `2` are not used.
- Replaced deprecated `scala.tools.nsc.util.AbstractFileClassLoader` with `scala.reflect.internal.util.AbstractFileClassLoader`
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
... replaced by hasPackageFlag, hasSymbolIn, getterIn, setterIn.
|
| | |\ \ \ \ \ \ \ \
| | | |_|_|_|/ / / /
| | |/| | | | | | | |
SI-9038 fix scaladoc syntax highlightning to leave unicode alone
|
| | | | |_|/ / / /
| | | |/| | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Syntax highlightning in code blocks used to manipulate the raw bytes of
a String, converting them to chars when needed, which breaks Unicode
surrogate pairs.
Using a char array instead of a byte array will leave them alone.
|
| | |\ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
SI-9182 Fix runtime reflection with package object, overloads
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Eponymous modules and methods should be allowed to live in the
same package scope. This can happen when using a module and
and implicit class, or when defining the overloads manually.
This commit tones back an assertion that was added for sanity checking
runtime reflection thread safety to only fire when we are sure that
neither the existing and current symbol of the given name are methods.
|
| | |\ \ \ \ \ \ \ \
| | | |_|_|/ / / / /
| | |/| | | | | | | |
better errors for macro applications with wrong number of arguments
|
| | | |/ / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The tryNamesDefaults branch of application typechecking contains the
checkNotMacro check, which errors out when we try to do named/default arguments
for macros (that's not supported yet, see SI-5920 for discussion).
Unfortunately, the check activates too early, because it turns out that
we can also enter tryNamesDefaults when the user just provides insufficient
number of arguments to a method by mistake, without expecting any default
arguments at all.
This leads to really confusing errors, which can luckily be fixed in a
very simple way by moving the checkNotMacro check down the happy path
of named/default typechecking.
|
| | |\ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
SI-9127 Xlint doesn't think spaces are significant
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
For purposes of warning about missing interpolators,
such as `"$greeting"` when the intended code was `s"$greeting"`,
spaces are no longer significant.
The heuristic was previously intended to allow compileresque
strings, where the dollar sign is a common prefix.
Currently, the Xlint warning can be selectively disabled.
|
| | |\ \ \ \ \ \ \ \
| | | |_|_|/ / / / /
| | |/| | | | | | | |
Improve diagnostic error on failed genLoadIdent
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
This error has been haunting us recently, firstly on Greg's machine
when compiling the compiler using the new SBT build, and more recently
during PR validation in #4316.
This commit will output an error like:
symbol value c#16812 does not exist in Macro.impl, which contains locals value a#16810, value b#16811
I've included symbol IDs in the hope that they will prove useful.
It seems that synthetic identifiers generated by the pattern matcher
are often seen in the vicinity of this bug.
|
| | |\ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
SI-9020 Avoid spurious value discarding warning post-typer
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Typechecking during the specialization phase was emitting a
bogus warning about value discarding. Such warnings in the
typer should be guarded by `!isPastTyper` to restrict the
analysis to the code the user originally wrote, rather than
the results of later typechecking.
I've made this change to the value discarding warning. I've also
changed a numeric widening warning in the vicinity, although I do
not have a test case for that.
|
| | |\ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
SI-9170 More flexible SessionTest
|
| | | | |_|/ / / / / /
| | | |/| | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
SessionTest session text can include line continuations
and pasted text. Pasted script (which looks like a
double prompt) probably doesn't work.
This commit includes @retronym's SI-9170 one-liner.
|
| | |\ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
SI-9231 Don't attempt implicit search for erroneous parameter
|
| | | | |/ / / / / / /
| | | |/| | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
If the instantiated type of an implicit parameter is erroneous,
we should not attempt the implicit search. This avoids the following
useless error message in the enclosed test:
error: ambiguous implicit values: ... match expected type M[<error>]
|
| |\| | | | | | | | |
| | |_|_|_|_|_|_|_|/
| |/| | | | | | | | |
|
| | |\ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
SI-9102: Reflect method invoke with mixed args
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Cover the second use case reported on the ML (ctors).
Improve formatting per the review. And it really does look
a lot better.
|
| | | | |_|_|_|/ / /
| | | |/| | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
A missing default branch when a method had value class
or by-name params caused other args to present as null
under reflective invocation.
|
| | |\ \ \ \ \ \ \ \
| | | |_|_|_|/ / / /
| | |/| | | | | | | |
SI-9219 Stream toString returns unexpected result
|
| | | | |/ / / / /
| | | |/| | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
- Cursor was not advanced before appending the second element
when only the first two elements of the stream were known.
- When there is no cycle in the stream, the "scout" (and
"cursor") ends up pointing to a stream where tailDefined
is false. This means that cursor is either empty, or
cursor.tail is not yet evaluated. The former case is handled
properly, but in the latter case, one more element
(cursor.head) needs to be appended.
|
| | |\ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Performance optimization - SeqLike
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Big improvements to updated and patch by not creating intermediate collections.
Moderate improvement to sorted by not using extra ArraySeq wrapper.
Small improvements to diff, intersect, and padTo by watching for duplicate or slow operations a bit more carefully.
```
Performance summary (all timings JDK 1.8.0_25 Linux):
method reason
=========== ===============================================================
diff 1.1x speedup on big seqs - avoid double map lookup
intersect 1.1-1.2x speedup - avoid double map lookup
padTo avoid multiple calls to length (good if length is slow)
patch 2.4-4.0x speedup - avoid intermediate collections
sorted 1.2-1.5x speedup - use array directly
updated 3.5-9.6x speedup - avoid intermediates (but children override)
```
|
| | |\ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
Inliner for GenBCode
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Method bodies that contain a super call cannot be inlined into other
classes. The same goes for methods containing calls to private
methods, but that was already ensured before by accessibility checks.
The last case of `invokespecial` instructions is constructor calls.
Those can be safely moved into different classes (as long as the
constructor is accessible at the new location).
Note that scalac never emits methods / constructors as private in
bytecode.
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
The inliner would incorrectly treat trait field accessors like
ordinary trait member methods and try to re-write invocations to the
corresponding static method in the implementation class. This rewrite
usually failed because no method was found in the impl class.
However, for lazy val fields, there exists a member in the impl class
with the same name, and the rewrite was performed. The result was that
every field access would execute the lazy initializer instead of
reading the field.
This commit checks the traitMethodWithStaticImplementation field of
the ScalaInlineInfo classfile attribute and puts an explicit
`safeToRewrite` flag to each call site in the call graph. This cleans
up the code in the inliner that deals with rewriting trait callsites.
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Issue precise warnings when the inliner fails to inline or analyze a
callsite. Inline failures may have various causes, for example because
some class cannot be found on the classpath when building the call
graph. So we need to store problems that happen early in the optimizer
(when building the necessary data structures, call graph, ClassBTypes)
to be able to report them later in case the inliner accesses the
related data.
We use Either to store these warning messages. The commit introduces
an implicit class `RightBiasedEither` to make Either easier to use for
error propagation. This would be subsumed by a biased either in the
standard library (or could use a Validation).
The `info` of each ClassBType is now an Either. There are two cases
where the info is not available:
- The type info should be parsed from a classfile, but the class
cannot be found on the classpath
- SI-9111, the type of a Java source originating class symbol cannot
be completed
This means that the operations on ClassBType that query the info now
return an Either, too.
Each Callsite in the call graph now stores the source position of the
call instruction. Since the call graph is built after code generation,
we build a map from invocation nodes to positions during code gen and
query it when building the call graph.
The new inliner can report a large number of precise warnings when a
callsite cannot be inlined, or if the inlining metadata cannot be
computed precisely, for example due to a missing classfile.
The new -Yopt-warnings multi-choice option allows configuring inliner
warnings.
By default (no option provided), a one-line summary is issued in case
there were callsites annotated @inline that could not be inlined.
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
I observed cases (eg Scaladoc tests) where we end up with 17k+
ClassNodes, which makes 500 MB.
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
The self parameter type may be incompatible with the trait type.
trait T { self: S => def foo = 1 }
The $self parameter type of T$class.foo is S, which may be unrelated
to T. If we re-write a call to T.foo to T$class.foo, we need to cast
the receiver to S, otherwise we get a VerifyError.
|