| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
JEP 118 added a MethodParameters attribute to the class file spec which
holds the parameter names of methods when compiling Java code with
`javac -parameters`.
We emit parameter names by default now.
|
|
|
|
|
|
|
|
|
| |
Before this commit, multiple invocations of universe.showRaw used a
shared weak map that caches footnotes. If the two printed objects
have equal components printed as footnotes, e.g., an equal TypeRef,
the result of the second invocation depends on whether the object
has been collected (and removed from the weak map) or not.
See https://github.com/scala/scala-dev/issues/70#issuecomment-171701671
|
|\
| |
| | |
SI-9622 Native method may be private
|
| |
| |
| |
| |
| |
| | |
This was lost in a refactor.
https://github.com/scala/scala/commit/290f687fb6ab91b6aef62d871036ddc3829f12b4
|
|\ \
| | |
| | | |
SI-8700 Exhaustiveness warning for enums from Java source
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Until now, the warning was only emitted for enums from Java class files.
This commit fixes it by
- aligning the flags set in JavaParsers with the flags set in
ClassfileParser (which are required by the pattern matcher to
even consider checking exhaustiveness)
- adding the enum members as childs to the class holding the enum
as done in ClassfileParser so that the pattern matcher sees the enum
members when looking for the sealed children of a type
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
Depending on the current locale one can get 3,400000e+00 instead of
3.400000e+00 so the expected result should take this into account.
It's a similar change to one I made some time ago in 2.11.x:
https://github.com/scala/scala/pull/4204
|
|/
|
|
|
|
| |
One assertion in StringContextTest."f interpolator baseline"() was
relying on platform specific newline encoding, making it fail when run
on Windows.
|
|\
| |
| | |
[SI-9454] Add isAlive method into sys.process.Process trait
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Language imports are preceding other imports
- Deleted empty file: InlineErasure
- Removed some unused private[parallel] methods in
scala/collection/parallel/package.scala
This removes hundreds of warnings when compiling with
"-Xlint -Ywarn-dead-code -Ywarn-unused -Ywarn-unused-import".
|
|\ \
| | |
| | | |
Desugar module var and accessor in refchecks/lazyvals
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Rather than leaving it until mixin.
The broader motivation is to simplify the mixin phase of the
compiler before we get rid of implementatation classes in
favour of using JDK8 default interface methods.
The current code in mixin is used for both lazy val and modules,
and puts the "slow path" code that uses the monitor into a
dedicated method (`moduleName$lzyCompute`). I tracked this
back to a3d4d17b77. I can't tell from that commit whether the
performance sensititivity was related to modules or lazy vals,
from the commit message I'd say the latter.
As the initialization code for a module is just a constructor call,
rather than an arbitraryly large chunk of code for a lazy initializer,
this commit opts to inline the `lzycompute` method.
During refchecks, mixin module accessors are added to classes, so
that mixed in and defined modules are translated uniformly. Trait
owned modules get an accessor method with an empty body (that shares
the module symbol), but no module var.
Defer synthesis of the double checked locking idiom to the lazyvals
phase, which gets us a step closer to a unified translation of
modules and lazy vals.
I had to change the `atOwner` methods to to avoid using the
non-existent module class of a module accessor method as the
current owner. This fixes a latent bug. Without this change,
retypechecking of the module accessor method during erasure crashes
with an accessibility error selecting the module var.
In the process, I've tweaked a tree generation utility method
to wvoid synthesizing redundant blocks in module desugaring.
|
|\ \ \
| | | |
| | | | |
SI-9110 Pattern `O.C` must check `$outer eq O` for a top level O
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The outer check was not being generated when the prefix was a
top level module. The enclosed test shows that we in fact must
synthesize the outer check in that case.
Perhaps the bug was introduced by neglecting to consider that
a module can inherit member classes.
|
|/ / |
|
|\ \
| | |
| | | |
DRY-er trees in pattern matcher code gen.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Rather than building a cascade of if/elses, push additional conditions
into a conjunction in the condition of a single if/else. This is
possible when emitting conditions for the list of arguments of a
pattern.
Here's an example of the improvement to post-pattern matcher trees:
https://gist.github.com/retronym/0d8f7126157061d72b81
While we could try to rely on the optimizer to coalesce the repeated
else clauses, it seems wasteful to emit the code in that way in
the first place.
|
|\ \ \ |
|
| |\ \ \
| | | | |
| | | | | |
Attacking exponential complexity in TypeMaps
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- Don't normalize existentials during the `contain`-s type map;
`ExistentialType#normalize' calls contains internally and
an exponential blowup ensues.
- Ensure that the type map used in variance validation never
returns modified types in order to avoid needless cloning of
symbols.
The enclosed test case still gets stuck in Uncurry, thanks to
the way that `TypeMap#mapOver(List[Symbol])` recurses through the
type first to check whether the type map would be an no-op or not.
If not, it repeats the type map with cloned symbols. Doing the work
twice at each level of recursion blows up the complexity.
Removing that "fast path" allows the enclosed test to compile
completely. As at this commit, it gets stuck in uncurry, which
dealiases `s.List` to `s.c.i.List` within the type.
Some more background on the troublesome part of `TypeMap`:
http://lrytz.github.io/scala-aladdin-bugtracker/displayItem.do%3Fid=1210.html
https://github.com/scala/scala/commit/f8b2b21050e7a2ca0f537ef70e3e0c8eead43abc
|
| |\ \ \ \
| | | | | |
| | | | | | |
less confusing wording for a dependent method type error
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
note to reviewers: the error messages in this file are over the place
about whether they're called "parameter sections", or "argument
lists", or what, so there's no point in being picky about that here
for context see SI-823
|
| |\ \ \ \
| | | | | |
| | | | | | |
Multi output problem with delambdafied compilation
|
| | |/ / / |
|
| |\ \ \ \
| | | | | |
| | | | | | |
it's Scaladoc, not ScalaDoc
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | | |
renaming the existing ScalaDoc and ScalaDocReporter classes might
break stuff, sadly, but at least we can fix the rest
|
| |\ \ \ \
| | | | | |
| | | | | | |
SI-9497 Fix SetLike#clear() default implementation
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
When dealing with mutable collections, it is not safe to assume iterators will remain consistent when the collection is modified mid-traversal. The bug reported in SI-9497 is very similar to SI-7269, "ConcurrentModificationException when filtering converted Java HashMap". Then, only the `retain` method was fixed. This commit fixes `clear`, which had the same problem.
|
| |\ \ \ \ \
| | |_|/ / /
| |/| | | | |
[SI-9503] Deprecate scala.collection.immutable.PagedSeq
|
| | | | | | |
|
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | | |
A session test with extra filtering best expresses the intentions.
No check file is required.
|
| |\ \ \ \
| | |/ / /
| |/| | | |
improvements to Windows build & test situation
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
this was failing because the expected output was:
res1: List[String] = List(shello, world.)
but the actual output was:
res1: List[String] = List(shello, world., Picked up _JAVA_OPTIONS: -Duser.home=y:\jenkins)
but the "Picked up..." part caused partest's filters feature to
ignore the entire line (it doesn't anchor matches to start of line.)
This was a tough one to track down.
|
| | | | | |
|
| |_|/ /
|/| | | |
|
|\ \ \ \
| | | | |
| | | | | |
SI-9178 Don't eta expand to an Function0-like SAM expected type
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Otherwise, we can end up with a subtle source incompatibility with
the pre-SAM regime. Arguably we should phase out eta expansion to
Function0 as well, but I'll leave that for another day.
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Remove GenASM
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
With GenBCode being the default and only supported backend for Java 8,
we can get rid of GenASM.
This commit also fixes/migrates/moves to pending/deletes tests which
depended on GenASM before.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-9527 Fix NPE in ambiguous implicit error generation
|
| | |_|_|_|/
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In #4673, an annotation was added to allow customization of the
compiler error for ambigous implicits. This change had incorrect
assumptions about the shape of trees that would be generated during
implicit search, and failed to account for the results of eta expanded
methods when searching for a function type.
This commit:
- Uses the symbol from `ImpilcitInfo`, rather than calling
`Tree#symbol` which is fraught with the danger of returning a
null symbol for something other than an application.
- Adds a test for customized messages for a polymorphic, eta
expanded method, and generalizes `treeTypeArgs` to handle the
implicit tree of shape `{ (x: X) => f[A](x)}`.
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
Fixes an inconsistency between BoxesRunTime and Predef's autoboxing
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Previously autoboxing implicits in Predef were inconsistent with
BoxesRunTime box/unbox due to different treatment of unboxing of
nulls. Implicits didn't check for null and would crash with NPE
unlike the BoxesRunTime which correctly returned zero value of
given type.
The fix is trivial: lets just use asInstanceOfs to implement
implicits in Predef. This would ensure that both have the same
behaviour and that the two would not diverge again in the future.
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
SI-9535 correct bytecode and generic signatures for @throws[TypeParam]
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
For @throws[E] where E is not a class type, GenASM incorrectly writes
the non-class type to the classfile. GenBCode used to crash before
this commit. Now GenBCode correctly emits the erased type (like
javac) and adds a generic signature.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
f interp test is junit
|