| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
An error suppresses all further warnings at the same position,
but multiple warnings can be heard.
|
|
|
|
|
| |
This reverts commit 884e1ce762d98b29594146d37b85384581d9ba96, reversing
changes made to f6fcc4431f272c707d49de68add532c452dd4b0f.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The parser hole I found while working on the generated positions
serves as the umbrella for a host of improvements. Upgraded
positions assigned during some specific challenging situations mostly
involving the creation of synthetic trees, e.g. for comprehensions
and closures. While doing so improved some error messages.
Eliminated some of the most glaring duplication in the parser.
It's written like there is some payoff associated with being
spectacularly imperative. Not so far.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One last flurry with the broom before I leave you slobs to code
in your own filth. Eliminated all the trailing whitespace I
could manage, with special prejudice reserved for the test cases
which depended on the preservation of trailing whitespace.
Was reminded I cannot figure out how to eliminate the trailing
space on the "scala> " prompt in repl transcripts. At least
reduced the number of such empty prompts by trimming transcript
code on the way in.
Routed ConsoleReporter's "printMessage" through a trailing
whitespace stripping method which might help futureproof
against the future of whitespace diseases. Deleted the up-to-40
lines of trailing whitespace found in various library files.
It seems like only yesterday we performed whitespace surgery
on the whole repo. Clearly it doesn't stick very well. I suggest
it would work better to enforce a few requirements on the way in.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
It comes looking for an implicit from (A @foo) => B
and gives up, despite the fact that there is an implicit
from A => B. Maybe there is some good reason for this,
and/or I would fully believe there is a better way to fix
it, but I'll propose this and wait to hear about the
good reason and/or better way.
|
|
|
|
|
|
|
|
|
|
| |
Add `adaptTypeOfReturn` hook to `AnnotationCheckers`.
Move adaptation of types of return expressions from `addAnnotations`
to `typedReturn` via `adaptTypeOfReturn` hook.
This resolves an inconsistency where previously types could have
a plus marker without additional CPS annotations. This also adds
additional test cases.
|
|
|
|
| |
This reverts commit 8d020fab9758ced93eb18fa51c906b95ec104aed.
|
|
|
|
|
| |
Disabled warnings that no longer apply because of tail returns.
Add several test cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable return expressions in CPS code if they are in tail position. Note that tail returns are
only removed in methods that do not call `shift` or `reset` (otherwise, an error is reported).
Addresses the issues pointed out in a previous pull request:
https://github.com/scala/scala/pull/720
- Addresses all issues mentioned here:
https://github.com/scala/scala/pull/720#issuecomment-6429705
- Move transformation methods to SelectiveANFTransform.scala:
https://github.com/scala/scala/pull/720#commitcomment-1477497
- Do not keep a list of tail returns.
Tests:
- continuations-neg/t5314-missing-result-type.scala
- continuations-neg/t5314-type-error.scala
- continuations-neg/t5314-npe.scala
- continuations-neg/t5314-return-reset.scala
- continuations-run/t5314.scala
- continuations-run/t5314-2.scala
- continuations-run/t5314-3.scala
|
|
|
|
|
|
|
|
|
| |
are in tail position)
Reverts commit 0ada0706746c9c603bf5bc8a0e6780e5783297cf.
Reverts commit 51c92f02229098d0b402a65a72267f7a17984022.
Reverts commit cdfbe8e39fbbec00c969cd74f117ae410b98b40b.
Reverts commit 796024c7429a03e974a7d8e1dc5c80b84f82467d.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a stack of context trees to AnnotationChecker(s). Here, it is used to
enforce that adaptAnnotations will only adapt the annotation of a return
expression if the expected type is a CPS type.
The remove-tail-return transform is reasonably general, covering cases such as
try-catch-finally. Moreover, an error is thrown if, in a CPS method, a return
is encountered which is not in a tail position such that it will be removed
subsequently.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
typers&patmatvirtualizer have ad-hoc support for dropping annotations
in a way that makes the CPS plugins happy... this is not ideal,
but unless virtpatmat runs after the plugin phases, I don't see how to solve it
running virtpatmat after the CPS plugin would mean the pattern matching evaluation
cannot be captured by CPS, so it's not even desirable to move it to a later phase
- typedIf must lub annotated types
- drop selector.tpe's annotations
- drop annots in matchEnd's argument type
- deal with annots in casts synth by in virtpatmat
(drop them from type arg to asInstanceof, recover them using type ascription)
- workaround skolemize existential dropping annots
CPS is the main reason why typedMatchAnonFun is not used anymore,
and PartialFunction synthesis is moved back to uncurry (which is quite painful due to labeldefs being so broken)
we can't synth partialfunction during typer since T @cps[U] does not conform to Any,
so we can't pass it as a type arg to PartialFunction, so we can't type a cps-transformed PF
after the CPS plugin, T @cps[U] becomes ControlContext[...], which is a type we can pass
to PartialFunction
virtpatmat is now also run until right before uncurry
(so, can't use isPastTyper, although it means more or less the same thing -- we don't run after uncurry)
the main functional improvements are in the selective ANF transform
its treatment of labeldefs was broken: for example,
LabelDef L1; LabelDef L2 --> DefDef L1; L1(); DefDef L2; L2()
but this does not take into account L1 may jump over L2 to another label
since methods always return (or fail), and the ANF transform generates ValDefs
to store the result of those method calls, both L1 and L2 would always be executed
(so you would run a match with N cases N times, with each partial run starting at a later case)
also fixed a couple of weird bugs in selective anf that caused matches to be duplicated
(with the duplicate being nested in the original)
since label defs are turned into method defs, and later defs
will be nested in the flatMap calls on the controlcontext
yielded by earlier statements, we reverse the list of method
definitions, so that earlier (in the control flow sense) methods
are visible in later ones
selective CPS now generates a catch that's directly digestible by backend
|
|
|
|
| |
Don't type pattern trees with annotations still attached.
|
|
|
|
|
|
|
|
| |
Avoid explicit type arguments which don't conform to bounds
where they could be successfully inferred.
I had to disable one "neg" test which is no longer neg.
Can anyone clue me in as to whether it is important?
|
| |
|
|
|
|
| |
multi-argument list methods.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
changes necessary to plug it back in while preserving everything which
has happened since then in tests and such, but we should be the lookout
for overreversion. Review by phaller (but as a formality, I don't think
it requires direct review.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If I work on this patch any longer without checking in I will go
stark raving mad. It is broken up into a couple pieces. This one is
the changes to test/. It includes fixing a bunch of tests, removing
deprecated constructs, moving jars used by tests to the most specific
plausible location rather than having all jars on the classpath of all
tests, and some filesystem layout change (continuations get their whole
own srcpath.) This would be the world's most tedious review, so let's
say no review.
[Note: after this commit, I doubt things will build very smoothly until
the rest of the partest changes follow. Which should only be seconds,
but just in case.]
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
added support for continuations in try/catch blocks. review by
community.
|
|
|