| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
SI-8680 Stream.addString is too eager
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Used the standard method of sending out two iterators, one twice as fast as the others, to avoid hanging on .force, .hasDefiniteSize, and .addString.
.addString appends a "..." as the last element if it detects a cycle. It knows how to print the cycle length, but there's no good way to specify what you want right now, so it's not used.
Added tests in t8680 that verify that cyclic streams give the expected results.
Added to whitelist names of methods formerly used for recursion (now looping).
|
|\ \
| | |
| | | |
SI-8815 mutable.LongMap makes different choices for splitAt vs etc.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It turns out that take/drop/splitAt/takeWhile/dropWhile inherit a smattering of foreach vs. iterator-based implementations. These aren't consistent unless they iterate in the same order. This probably reflects an undesirable underlying weakness, but in this particular case it was easy to make LongMap's foreach order agree with iterator.
Made traversal order of other foreach-like methods match also.
Also fixed a bug where Long.MinValue wasn't iterated.
Added unit test for iteration coverage of extreme values.
|
|\ \ \
| | | |
| | | | |
SI-8806 Add lower bound check to Any lint
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We already exclude the lint check for infer-any if
Any is somewhere explicit.
This commit adds lower bounds of type params to
the somewheres.
Motivated by:
```
scala> f"${42}"
<console>:8: warning: a type was inferred to be `Any`; this may indicate a programming error.
f"${42}"
^
res0: String = 42
```
|
|\ \ \ \
| | | | |
| | | | | |
isAnonymousClass/Function for delambdafy classes is not true
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Ydelambdafy:method lambda classes are not anonymous classes, and not
anonymous function classes either. They are somethig new, so there's
a new predicate isDelambdafyFunction.
They are not anonymous classes (or functions) because anonymous
classes in Java speak are nested. Delambdafy classes are always
top-level, they are just synthetic.
Before this patch, isAnonymous was sometimes accidentailly true: if
the lambda is nested in an anonymous class. Now it's always false.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
GenBCode: eliminate unreachable code
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is required for correctness of the generated bytecode. Exception
handlers and local variable descriptors specify code offset ranges.
These offsets have to exist, not be eliminated.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Tests for emitting expressions of type Nothing.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
JUnit tests may use tools from partest-extras (ASMConverters)
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We rely on dead code elimination provided by the ASM framework, as
described in the ASM User Guide (http://asm.ow2.org/index.html),
Section 8.2.1. It runs a data flow analysis, which only computes
information for reachable instructions. Instructions for which no
data is available after the analyis are unreachable.
There's one issue with the ASM framework (or the way we use it): Data
flow analysis requires the maxlocals and maxstack of each method to be
computed. The ASM framework calculates these maxes only when
writing the classfiles, not during code generation. In order to run
DCE, we therefore run a MethodWriter beforehand on every method. This
assings the MethodNode's maxStack/maxLocals, but it does more work
(writes the instructions to a byte array).
This is also what Miguel uses on his branch. The change is basically
the same as https://github.com/lrytz/scala/commit/bfadf92c20.
We could probably make this faster (and allocate less memory) by
hacking the ASM framework: create a subclass of MethodWriter with a
/dev/null byteVector. Another option would be to create a separate
visitor for computing those values, duplicating the functionality from
the MethodWriter.
For now, I added some timers to be able to measure the time DCE takes.
Here's compiling the library with -Ystatistics:jvm
time in backend : 1 spans, 6597ms
bcode initialization : 1 spans, 8ms (0.1%)
code generation : 1 spans, 4580ms (69.4%)
dead code elimination : 3771 spans, 742ms (11.2%)
classfile writing : 1 spans, 879ms (13.3%)
|
| |/ / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Merge 2.10.x to 2.11.x
|
|/| | | | | |
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
[backport] SI-7470 implements fundep materialization
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
To quote gkossakowski:
Thinking about it more, could we hide this behind 'Y' flag instead?
We have lesser obligation to keep around Y flags and this is something
we should remove from 2.11/2.12.
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Backports 21a8c6c from the 2.11.x branch under -Xfundep-materialization
as per Miles Sabin's request. Thanks Miles!
|
|\ \ \ \ \ \ \
| |_|_|_|_|_|/
|/| | | | | | |
SI-8817 Correct scaladoc for scala.sys.addShutdownHook
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
- Remove mention that shutdown hook is daemon thread
- Add link on scala.sys.ShutdownHookThread class
|
|\ \ \ \ \ \ \
| |_|_|_|_|_|/
|/| | | | | | |
moves the impl of quasiquotes to scala.reflect
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This brings consistency with scala.reflect.reify and scala.reflect.macros
already existing in scala-compiler. To the contrast, scala.tools.reflect,
the previous home of quasiquotes, is a grab bag of various stuff without
any central theme.
|
|\ \ \ \ \ \
| |_|_|_|/ /
|/| | | | | |
SI-8398 - Compiler specifies lazy variables as methods
|
|/ / / / /
| | | | |
| | | | |
| | | | | |
Compiler internals treat lazy vals as methods. Therefore, we need to have a special case for them when assembling the warning message.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-8764 fix return type of case class productElement under Xexperimental
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Xexperimental
Under Xexperimental, productElement now returns the lub instead
of the weak lub of case class parameter types (numeric widening
shouldn't magically happen *inside* productElement).
This was removed from 2.12.x in 6317ae2.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix broken URL for MathJAX Javascript dependency.
|
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Loaded using an DNS alias for the CDN, as per the
[instructions](http://docs.mathjax.org/en/latest/configuration.html)
I also switched from `latest` to `2.3-latest`, so that we don't
automatically perform major upgrades.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-5254 running an empty scala script should succeed
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The script runner made the assumption that "compilation succeeded"
implies "there is a Main class to run", but this can be wrong if the
script is empty (or only contains imports/comments).
The ScriptRunner now uses the ClassPath utility to check if there really
is a main class. If not, it doesn't try to run it and returns
peacefully. This also makes `scala -e ''` succeed.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-8474 Inconsistent behavior of patch method
|
| | |_|_|_|_|/
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Changed Iterator to be consistent with other collections.
Also fixed SeqViewLike to validate/constrain inputs.
No specific tests; quasi-comprehensive collection tests will cover this later.
|
|\ \ \ \ \ \ \
| |_|_|/ / / /
|/| | | | | | |
-Ystatistics accepts a list of phases for which to print stats
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This is pretty easy, since a ValueSet is a BitSet.
When the setting is updated, recompute the current
set of values, which is cheap and succinct.
Checking a flag is also easy and fast.
Choices in MultiChoiceSettings may enable other choices.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
MultiChoiceSetting and Xlint with its deprecated aliases is now a bit
simpler, but there's still room for improvement, as noted in comments.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The test in StdNamesTest was introduced in cff8b569, where newTermName
would throw on a negative length. In b090f97 this was changed to fix
the negative length, but the test was not adapted (as it didn't fail).
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-8803 generate super accessor for super[A], if A is outer superclass
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
class C extends A with T {
class I {
C.super[T]
C.super[A]
}
}
A super call in a nested class of the form super[T] where T is a
parent trait of the outer class doesn't need an accessor: mixin can
directly re-route the call to the correct implementation class - it's
statically known to be T$class.
However, if a nested class accesses super[A] and A is the superclass
of the outer class (not a trait), then we need a super accessor in the
outer class.
We need to add the mixin name to the super accessor name, otherwise
it clashes with non-qualified super accessors.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-8786 disable part of thest that's failing the jdk8 build
|
| | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
SI-8498 @compileTimeOnly should be aware of bridge methods.
|
| | |/ / / / / / /
| |/| | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Calling a @compileTimeOnly method from another @compileTimeOnly
method happens when the former gets a bridge method. It should not
throw an error. Calling the bridge or the method will anyway.
|