| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a continuation of 1591c14e50, which didn't go far enough
to handle method calls with a mix of specialized and unspecialized
type parameters.
This commit modifies `specSym` to calculate the residual type
of the original method after specialized type parameters have
been removed and the type environment of the candidate specialized
variant has been subsituted.
For example, here is trace of `specSym` when searcing for the
specialized variant of `f4` in the enclosed test:
tree = Main.this.f4[Nothing, Int]
tree.tpe = (a: Int, b: List[(Int, Nothing)])String
fun.tpe = [B, A](a: A, b: List[(A, B)])String
residualTreeType = [B](a: Int, b: List[(Int, B)])String
memberType = [B](a: Int, b: List[(Int, B)])String
env = Map(type A -> Int)
doesConform = true
A few "todo" tests are included that highlight an endemic
issue with the current specialization implementation: type
parameters that show up after `uncurry` might be clones of
the original symbols from typer, if they have been through
a TypeMap (e.g. within a call to `uncurryTreeType`). So testing
them for existence with the `typeEnv` map is fruitless.
No amount of `atPhase` acrobatics can rescue us from this;
we need to transport this information in a symbol-cloning
resiliant manner. Maybe Symbol Attachments?
|
|\
| |
| | |
SI-7088 Array crasher in erasure.
|
| |
| |
| |
| |
| | |
The usual business where half our pattern matches are missing
half the necessary cases.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit b0758f5cb9d966b940933d48bdbb45d17a80de66.
This commit sent startup time through the roof, at least
in some circumstances (it is presumably related to one's
current working directory.)
|
|\ \
| | |
| | | |
SI-7474 Parallel collections: End the exception handling madness
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
"What's wrong with an API which non-deterministically returns either
type A or type B(Set(A, ...))?"
This is pretty much what the exception handling behavior of the
parallel collections does: If exceptions of type A occur, either an
exception of type A or an exception of type B, wrapping multiple
exceptions of A's, is returned.
This behavior is incredibly broken and so unintuitive, that even
people writing tests don't handle it correctly, as seen in test
files/run/t5375.scala.
Concerning “non-deterministic”:
How many exceptions are observed before the operation is aborted
depends on the machine, the available cores and hyper-threading,
the operating system, the threadpool implementation and
configuration, the size of the collection and the runtime itself.
In fact, files/run/t5375.scala can be made to fail reproducible
on both jdk7u and Avian, if we run on a single-core machine
like in a virtual machine.
With this change, we just pass the "first" exception which occurs.
This is
- consistent with the behaviour of sequential collections,
- doesn't require users to know more about parallel collections
than they already do ("elements might be processed out of order"),
- in line with what Java 8 does.
“Why don't we wrap everything in CompositeThrowables?”
Even consistently returning CompositeThrowable doesn't make much
sense (because we have fail-fast behaviour and don't wait until
all tasks have finished or have thrown an exception).
Therefore, there is no useful semantic in having a
CompositeThrowable which returns "some" exceptions.
I have done extensive research into C#'s approach (which is very
similar to what Scala did until now, but even more messy) and
the key observation from asking multiple C# developers is that
not a single one had understood how PLINQ handled exceptions or
could describe the semantics of it.
As a consequence, either
a) gather and return all exceptions in a CompositeThrowable or
b) just return one, unwrapped,
instead of non-deterministically wrapping a non-deterministic
number of exceptions into a completely unrelated wrapper type.
Considering that changing the parallel collection semantics in
such a profound way as described in a) is out of question, b)
is chosen.
As soon as Scala targets Java > 7 Throwable#addSurpressed can be
used to add further exceptions to the one which gets returned.
This would allow passing more information to the caller without
compromising the simplicity of the API.
|
|\ \
| |/
|/| |
SI-7502 removing non-existent element from ListMap leaves it unchaged.
|
| |
| |
| |
| |
| |
| |
| | |
Current imperative version constructs a new ListMap regardless of
the fact the map doesn't contain the element. Replace it with the
tail-recursive variant that conserves. Also replace some usages with
the invariant now held.
|
|\ \
| | |
| | | |
Print raw types correctly.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The "For convenience, these are usable as stub implementations"
bit has generated surprisingly few angry letters, but I noticed
today it blows it on raw types. Or, used to blow it.
/** As seen from class Sub, the missing signatures are as follows.
* For convenience, these are usable as stub implementations.
* (First one before this commitw as 'def raw(x$1: M_1)'
*/
def raw(x$1: M_1[_ <: String]): Unit = ???
def raw(x$1: Any): Unit = ???
|
|\ \ \
| |/ /
|/| | |
SI-7469 Remove deprecated elements in Java{Conversions,Converters}
|
| | | |
|
|\ \ \
| | | |
| | | | |
SI-7003 Partest redirects stderr to log file
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Partest will also read files/filters and files/kind/filters for
filter expressions (one per line, trimmed, leading #comments)
which are taken as regexes.
A test/files/filters is provided which attempts to quell HotSpot
warnings; the test for this commit requires it.
The elided lines can be revealed using the lemon juice of verbosity:
apm@mara:~/projects/snytt/test$ ./partest --verbose --show-diff files/run/t7198.scala
[snip]
>>>>> Transcripts from failed tests >>>>>
> partest files/run/t7198.scala
% scalac t7198.scala
[snip]
% filtering t7198-run.log
--Over the moon
--Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory (errno = 28).
The filtering operation is part of the transcript, which is printed on failure.
No attempt is made to be clever about not slurping the filters file a thousand times.
Previous literal patterns had to be updated because there's parens in them thar strings.
Future feature: pattern aliases, define once globally and invoke in test filters.
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some scalac output is on stderr, and it's useful to see that
in the log file, especially for debugging.
Adds a line filter for logs, specified as "filter: pattern"
in the test source.
Backslashes are made forward only when detected as paths.
Test alignments:
Deprecations which do not pertain to the system under test
are corrected in the obvious way.
When testing deprecated API, suppress warnings by deprecating
the Test object.
Check files are updated with useful true warnings, instead of
running under -nowarn.
Language feature imports as required, instead of running under -language.
Language feature not required, such as casual use of postfix.
Heed useful warning.
Ignore broken warnings. (Rarely, -nowarn.)
Inliner warnings pop up under -optimise only, so for now, just
filter them out where they occur.
Debug output from the test required an update.
|
|\ \ \
| |/ /
|/| | |
Concision contribution.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We have lots of core classes for which we need not go through
the symbol to get the type:
ObjectClass.tpe -> ObjectTpe
AnyClass.tpe -> AnyTpe
I updated everything to use the concise/direct version,
and eliminated a bunch of noise where places were calling
typeConstructor, erasedTypeRef, and other different-seeming methods
only to always wind up with the same type they would have received
from sym.tpe. There's only one Object type, before or after erasure,
with or without type arguments.
Calls to typeConstructor were especially damaging because (see
previous commit) it had a tendency to cache a different type than
the type one would find via other means. The two types would
compare =:=, but possibly not == and definitely not eq. (I still
don't understand what == is expected to do with types.)
|
|\ \ \
| | | |
| | | | |
SI-7499 Additional test case for SI-7319
|
| | |/
| |/|
| | |
| | | |
From a duplicate ticket.
|
|\ \ \
| |_|/
|/| | |
SI-3425 erasure crash with refinement members.
|
| | |
| | |
| | |
| | | |
Probably overshot the mark a little.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Checking that a refinement class symbol does not override
any symbols does mean it will have to be invoke reflectively;
but the converse is not true. It can override other symbols
and still have to be called reflectively, because the
overridden symbols may also be defined in refinement classes.
scala> class Foo { type R1 <: { def x: Any } ; type R2 <: R1 { def x: Int } }
defined class Foo
scala> typeOf[Foo].member(TypeName("R2")).info.member("x": TermName).overrideChain
res1: List[$r.intp.global.Symbol] = List(method x, method x)
scala> res1 filterNot (_.owner.isRefinementClass)
res2: List[$r.intp.global.Symbol] = List()
And checking that "owner.info decl name == this" only works if
name is not overloaded.
So the logic is all in "isOnlyRefinementMember" now, and
let's hope that suffices for a while.
|
|\ \
| |/
|/| |
SI-7436 Varargs awareness for super param aliasing.
|
| |
| |
| |
| |
| |
| |
| | |
Don't consider a super class parameter accessor to be
an alias if it is a repeated. Parameter aliases are used
to avoid retaining redundant fields in the subclass; but
that optimization is out of the question here.
|
|\ \
| | |
| | | |
Toward more organized typer state.
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | | |
* origin/master:
An attempt to make tests deterministic.
SI-7427 stop crashing under -Ydebug.
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* commit 'd93826f278':
Incorporated reviewer feedback.
Incorporated reviewer feedback.
Refactored stabilize.
Eliminated HKmode.
Eliminated RETmode.
Eliminated SNDTRYmode.
Started eliminating modes.
Corralling Modes into a smaller pen.
Conflicts:
src/compiler/scala/tools/nsc/typechecker/Macros.scala
src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
|
| | |\ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* master:
SI-7469 Remove @deprecated scala.util.logging
SI-3943 Test case for already-fixed Java interop bug
Fix formatting for couple of docs in the compiler
SI-7476 Add documentation to GenericTraversableTemplate
SI-7469 Remove @deprecated scala.util.parsing.ast
SI-7469 Remove @deprecated MurmurHash elements
SI-7469 Remove deprecated elements in s.u.parsing.combinator
SI-7469 Make @deprecated elems in scala.concurrent private[scala]
removes duplication in inferImplicitValue
SI-7047 fixes silent for c.inferImplicitXXX
SI-7167 implicit macros decide what is divergence
macroExpandAll is now triggered in all invocations of typed
SI-5923 instantiates targs in deferred macro applications
SI-6406 Restore deprecated API
SI-6039 Harden against irrelevant filesystem details
Limit unnecessary calls to Type#toString.
fix typo in comment
SI-7432 add testcases
SI-7432 Range.min should throw NoSuchElementException on empty range
AbstractFile.getDirectory does not return null when outDir is "."
Conflicts:
src/compiler/scala/tools/nsc/typechecker/Typers.scala
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Attempting to reduce the frequency of low-level operations
with modes. I mean stuff like this:
if ((mode & (EXPRmode | LHSmode)) == EXPRmode)
THey don't make those ten line boolean guards any easier
to understand. Hopefully this will lead us toward eliminating
some of the modes entirely, or at least better isolating
their logic rather than having it interspersed at arbitrary
points throughout the typer.
Modes are in their entirety a leaked implementation detail.
Typing a tree requires a tree and optionally an expected type.
It shouldn't require a bucket of state bits. In subsequent
commits I will start eliminating them.
This commit also breaks adapt down into more digestible chunks.
|
|\ \ \ \ \ \
| |_|_|_|/ /
|/| | | | | |
SI-7494 Each plugin must only be instantiated once.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Exploit SI-6446 fix to move old pending tests for plugins to the
active pool.
Also, nuance the partest runner to allow the compiler to crash
with a FatalError if a check file is present.
Some of the plugin tests make phase assembly throw.
One of the legacy tests was moved back to pending:
There seems to be a race for who shall be deemed truly dependent.
Back to pending for you!
apm@mara:~/projects/snytt/test$ ./partest files/neg/t7494-cyclic-dependency/
Selected 1 tests drawn from specified tests
> starting 1 test in neg
ok 1 - neg/t7494-cyclic-dependency
1/1 passed (elapsed time: 00:00:04)
Test Run PASSED
apm@mara:~/projects/snytt/test$ ./partest files/neg/t7494-cyclic-dependency/
Selected 1 tests drawn from specified tests
> starting 1 test in neg
!! 1 - neg/t7494-cyclic-dependency [output differs]
> 0/1 passed, 1 failed in neg
>>>>> Transcripts from failed tests >>>>>
> partest files/neg/t7494-cyclic-dependency
% scalac t7494-cyclic-dependency/ThePlugin.scala
% scalac t7494-cyclic-dependency/sample_2.scala
error: Cycle in compiler phase dependencies detected, phase cyclicdependency1 reacted twice!
% diff files/neg/t7494-cyclic-dependency-neg.log files/neg/t7494-cyclic-dependency.check
@@ -1 +1 @@
-error: Cycle in compiler phase dependencies detected, phase cyclicdependency1 reacted twice!
+error: Cycle in compiler phase dependencies detected, phase cyclicdependency2 reacted twice!
0/1 passed, 1 failed (elapsed time: 00:00:04)
Test Run FAILED
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The nondeterminism presently showing itself in
presentation/implicit-member is a consequence of the
presentation compiler tests relying on details of the
behavior of toString calls. We need to stomp this out,
but it will take a while. Based on the check file
changes enclosed with this commit, this will suffice
for the presentation compiler tests. A broader assault
will have to take place, but not yet.
|
| |/ / / /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Change "dumpClassesAndAbort" to "devWarning". You can witness
it happen like so.
% scalac test/files/pos/t7427.scala -Ydebug -Xdev
...
[running phase cleanup on t7427.scala]
[running phase icode on t7427.scala]
warning: !!! PJUMP(method matchEnd4)/scala.tools.nsc.backend.icode.GenICode$PJUMP is not a control flow instruction
warning: !!! PJUMP(method case6)/scala.tools.nsc.backend.icode.GenICode$PJUMP is not a control flow instruction
[running phase inliner on t7427.scala]
[running phase inlinehandlers on t7427.scala]
Having now lived with this for months, I have no ambition to
unravel the actual problem, I just want it to stop crashing.
|
|\ \ \ \ \
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | | |
Conflicts:
src/compiler/scala/tools/nsc/typechecker/Implicits.scala
src/reflect/scala/reflect/runtime/JavaMirrors.scala
|
| |\ \ \ \
| | | | | |
| | | | | | |
[backport #1727] SI-7359 cyclic nested java class
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The original commit message (from 54a84a36d5):
SI-6548 reflection correctly enters jinners
When completing Java classes, runtime reflection enumerates their
fields, methods, constructors and inner classes, loads them and
enters them into either the instance part (ClassSymbol) or the
static part (ModuleSymbol).
However unlike fields, methods and constructors, inner classes don't
need to be entered explicitly - they are entered implicitly when
being loaded.
This patch fixes the double-enter problem, make sure that enter-on-load
uses the correct owner, and also hardens jclassAsScala against double
enters that can occur in a different scenario.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
What a touchy beast the compiler is.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-1786 incorporate defined bounds in inference
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This is a variation on the previous commit which excludes
named type parameters, so this works
def f(x: Class[_]) = x.foo.bar
But this does not:
def f[T](x: Class[T]) = x.foo.bar
This seems undesirable to me, but I offer it in case it makes
the patch more attractive to others.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Also fixes SI-5459.
Look, you don't have to redeclare the bounds, isn't it exciting?
For instance, there are eight places in JavaMirrors with this:
jTypeVariable[_ <: GenericDeclaration]
After this code is in starr, those can look like this:
jTypeVariable[_]
Since TypeVariable's definition looks like this:
interface TypeVariable<D extends GenericDeclaration>
We already know that!
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-6488 Interrupt i/o threads on process destroy
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The previous fix uses Thread.stop to stop the threads which
drain outputs, but should do something orderly.
This commit interrupts the threads, which must check isInterrupted
before attempting further i/o.
The reading thread will suppress either the interruption or the
IOException cited in the ticket.
Similarly, i/o handlers must preserve and communicate interrupted
status.
The modest goal of this fix is to ameliorate any stack traces
when the process is destroyed.
The test runs itself as a sample process with output.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Merge v2.10.1-326-g4f8c306 into master
|
| |\ \ \ \ \ \ \ \
| | |_|_|/ / / / /
| |/| | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
================================================================
Merge commit 'v2.10.1-326-g4f8c306' into merge/v2.10.1-326-g4f8c306-to-master
Conflicts:
src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala
src/reflect/scala/reflect/runtime/JavaMirrors.scala
================================================================
Merge -s ours 4e64a27 ([nomaster commit range])
================================================================
Merge commit '0ae7e55' into merge/v2.10.1-326-g4f8c306-to-master
Conflicts:
src/compiler/scala/tools/nsc/typechecker/Macros.scala
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
SI-7464 allows FieldMirror.set to update vals
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
There's no reason to leave such sentinels in place inside a facility
designed to circumvent usual restrictions of static types / visibility.
|
| |\ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
easy way of writing not implemented macros
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Even though it's easy to mark regular method bodies as stubs (using ???),
there's no simple way of doing the same for macro methods. This patch
fixes the inconvenience.
|
| | |_|_|_|_|/ / / /
| |/| | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Nothing breaks. Why did by-name arguments have this
extra check? What's the difference to a () => T?
The check was added originally in 8414eba.
|
| |\ \ \ \ \ \ \ \ \
| | |/ / / / / / / /
| |/| | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
viktorklang/wip-SI7383-EC-prepare-in-Future-apply-2.10-√
SI-7383 - call ExecutionContext.prepare in Future.apply
|