| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
internal execution context of Future
|
|\
| |
| | |
SI-6536 Generates super accessors X.super[Y].blah when Y is a class
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The main change here is to add another case for generating super accessors -
the case in X.super[Y].blah when X isn't the current class and Y is a class.
The change is deliberately kept as minimal as possible to reduce the chance
of breaking something in the 2.9.x line.
Additionally GenICode now detects the case when we're trying to emit
byte code that would be nonsense and warns about it. That
can safely be made an assert for 2.11.
Finally a related assert in RefChecks is beefed up to output a bit more useful
information.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Other than adding the new APIs, a few changes are required:
1. Build. The Java sources in "scala/concurrent/impl" need forkjoin.jar
on the classpath. Thus, I replaced the "classpath" attribute in the
respective `javac` ant tasks (locker.lib, quick.lib, and strap.lib)
with a "classpathref" attribute pointing to a classpath which includes
also the forkjoin.jar. In the locker.lib target, exclude the duration
package and everything that depends on it. In the docs.lib target,
enable dependent method types, since they're used in the
`scala.concurrent.duration` package.
Also, the library is built with -Ydependent-method-types
(for both quick & strap -- use consistent options for stability)
2. Dependent method types and SI-5958. The `duration` package relies on
dependent method types, and requires a backport of SI-5958.
|
|/
|
|
|
|
|
|
|
| |
`this` (or the self variable) passed as an actual argument to a method
should receive a singleton type when computing the method's resultType
this is necessary if the method's type depends on that argument
adapts the test so that it runs on 2.9.x
|
|\
| |
| | |
Backport of #994 (SI-5314 - CPS transform of return statement fails)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| | |
Other fixes:
- remove CPSUtils.allCPSMethods
- add clarifying comment about adding a plus marker to a return expression
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
| |
This fixes a regression in the 2.9.x branch (code combining CPS and
try-catch crashing the compiler). The fix is simply undoing an
optimization that was done in the 2.10 CPS plugin (replacing a
function with only a match by a match on an empty tree).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
protected/super accessor issue: Don't subvert the creation of the
standard protected accessor with the java interop accessor. For
SI-2296, the compiler emits an error instead of causing an illegal
access error at runtime.
Adapted from e498fac7fdbda3187a2a4fffcdf7fa4f9ddb7ac8.
Conflicts:
src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala
|
|
|
|
|
| |
Fix #6312.
review by @odersky,@lrytz.(cherry picked from commit 4f932df552fd2a9e1af31bc3b5fbbfeeaa15feed)
|
|\
| |
| | |
Backport "Make Stream.withFilter.{map,flatMap} run in constant stack space" against 2.9.x
|
| | |
|
| |
| |
| |
| | |
Test a wider range of functionality.
|
| |
| |
| |
| |
| | |
No need to check the output - checking programmatically that the
produced streams are empty is enough.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The included test currently fails because `map` and `flatMap` do not
run in constant stack space on a stream returned by `Stream.withFilter`,
as I reported here:
https://groups.google.com/d/msg/scala-language/WqJR38REXnk/saaSiDdmyqoJ
Fix the problem and add a simple testcase.
Note that the stack space consumed when producing an element of this stream is
proportional to the number of elements failing the test before the next
success. The stack space consumed to produce the stream itself is the
space needed to produce the first element, that is, is proportional to
the number of failures before the first success.
|
|\ \
| | |
| | |
| | |
| | | |
Blaisorblade/topic/backport-exponential-specialization-fix
[Backport] Fix for exponential compile time in specialization.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Backport fix to 2.9.2, from commit 39f01d4f48e59c2037a3af759eb6d55d0da50e70
on paulp/scala.
Review by @prokopec.
Conflicts:
src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
|
| | |
| | |
| | |
| | |
| | | |
This reverts commit 0132464e7094b158731e950ee6998515871baf60, reversing
changes made to 764bd8ec4d8f12764082b1c52e0c2b859c550c0b.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I think this fixes SI-2296, the inability to access java protected
members from a trait which extends a java class. Counterexamples
appreciated. Closes SI-2296. Review by @dragos.
cherry-picked and adapted from f708b87e55.
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
This commit backports various utility methods from the 2.10 compiler/reflection
library to the 2.9 continuations plugin. They are added to the corresponding
types in 2.9 using extension methods.
Disable test continuations-neg/infer0
|
|/
|
|
| |
Fix for bumpy proxy equals. Closes SI-4807, no review.
|
|
|
|
|
|
|
|
|
| |
All replacement methods use dolar signs to identify groups in the
matched string, and backslashes to escape characters. Document this
behavior, and provide a method that can be used to properly quote
replacement strings when this behavior is not desired.
Closes SI-4750.
|
|
|
|
|
|
| |
The size map size computation for parallel hash sets was invalid.
No review.
|
|
|
|
|
|
|
|
|
| |
Fix for a bug in CharArrayReader which made triple quoted strings
fail to parse sometimes. Note: when the temptation strikes to adjust
for special cases by letting the regular case happen and subsequently
attempting to fix the ball of mutation by selectively applying what
seems like the inverse operation, please consider the possibility that
this is not the optimal approach. Closes SI-4785, no review.
|
|\
| |
| | |
Backport/4835
|
| |
| |
| |
| |
| |
| | |
This test case only confirm that StreamIterator's lazyiness is not broken.
Test case about memory consumption could be created. However, such a
test cause a greatly increased time of test.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Has to be somewhere more directly tied to structural
refinements. See run/lub-visibility.scala before/after
output for motivation. Closes SI-5534.
Conflicts:
src/compiler/scala/tools/nsc/symtab/Types.scala
|
| | | |
| \ | |
|\ \ \
| | |/
| |/|
| | | |
'szabolcsberecz/backports/fix-specialized-tests' and 'szabolcsberecz/backports/SI-5380' into develop-2.9.x
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(cherry picked from commit 02e260a8e67e2b2b6f876aafe76cd61248a89374)
Conflicts:
src/compiler/scala/tools/nsc/transform/UnCurry.scala
Lift only *non-local* returns of try expressions.
(cherry picked from commit edf3ae0b8c3688b5cacbe2f7e2ae826f5fbb7644)
Conflicts:
src/compiler/scala/tools/nsc/transform/UnCurry.scala
|
|/
|
|
| |
(cherry picked from commit 9f5767dd31395cac0bc64c86c2cacf247b1924fa)
|
|
|
|
|
|
|
|
| |
Fixes NPE using iterator with an XML attribute being null or None )
(SI-5052 Also fixes incorrect size method (SI-5115 )
Contributed by Jordi Salvat i Alabart. Closes SI-5052, SI-5115, no
review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
slight improvement to lubList so that the simple case of lubbing type
constructors works. review by extempore
the strategy is to detect when the ts in lub(ts) are actually type
constructors and remember their type parameters the BTS of a type
constructor is a list of proper types (the type constructors have been
applied to their dummy arguments, which are simply type refs to the
original type parameters) in lubList, we undo this damage by stripping
these dummy arguments (they refer to type parameters that are meant to
be bound)
a better fix would be to actually bind those type parameters that
appear free in error, but that would require major changes to the BTS
infrastructure
example that only kindasorta works now...
given:
trait Container[+T]
trait Template[+CC[X] <: Container[X]]
class C1[T] extends Template[Container] with Container[T]
C1's BTS contains Template[Container] with Container[T], but that
should really be [T] => Template[Container] with Container[T]
instead of wrapping it in a polytype, the current approach uses
elimHOTparams to patch up this type so that it looks more like a type
ctor: Template[Container] with Container, but this is ill-kinded as
Template[Container] is a proper type, whereas Container is not
the performance impact should be minimal, but caveat reviewer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes two major problems:
1. InnerClasses table missed entries
that would close the chain between
nested and top-level class.
2. In some situations, classes
corresponding to objects would be
not be reported in the InnerClasses
table.
For details it's the best to check SI-4819, SI-4820 and SI-4983.
First problem mentioned above was straightforward to fix so I won't be
going into details.
The second one deserves more attention. From now, classes corresponding
to objects are properly reported as inner classes. Also, members
(classes, objects) of objects are reported as inner classes of classes
corresponding to objects.
There's one caveat though: top level objects get two classes (regular
and mirror). Members of top-level objects are declared as inner classes
of *mirror* class and not regular one. The reason for that is to allow
importing them from Java. For example:
object A { class B }
will be compiled into following classes: A, A$, A$B. If we declared
A$B as inner class of A$ (regular class for objects) then it would be
impossible to import B using "import A.B" or "import A$.B" constructs.
The reason for that is that Java compiler seems to blindly put dollars
instead of looking at InnerClasses attribute.
Since non-top-level objects don't have a mirror class it's impossible to
use the same solution. Thus, in case like this:
object A { object B { class C } }
it's impossible to import C from Java. That's the tradeoff for fixing
other (more serious) problems. It's never been possible to do that in a
clean way so we are not making situation worse.
As a nice consequence of this change, we get better way to refer to
inner members of top-level objects. It's been reflected in one of
test-cases that is updated by this change.
Fixes SI-4789 SI-4819 SI-4820 SI-4983 and possibly some other tickets
related to reflection.
Review by extempore, dragos.
Conflicts:
src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
test/files/pos/javaReadsSigs/fromjava.java
|
|
|
|
|
|
|
|
| |
(cherry picked from commit 91dbfb2a8f466cf30f7b02cbc6f3e89376d31c59)
Conflicts:
src/continuations/plugin/scala/tools/selectivecps/SelectiveANFTransform.scala
|
|
|
|
|
|
|
|
| |
multi-argument list methods.
Conflicts:
src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The @migration annotation can now be used like @deprecation.
Old syntax is still supported, but deprecated.
Improve wording and consistency of migration messages, migration
warnings also print the version in which the change occurred now.
Partially fixes SI-4990.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Functions of functions use parens for grouping.
Conflicts:
src/compiler/scala/tools/nsc/symtab/Types.scala
|
|/
|
|
|
|
|
|
|
| |
One's devotion to aesthetics must not be allowed to trump one's
commitment to clearly delineated tuplehood. Closes SI-5067, no review.
Conflicts:
src/compiler/scala/tools/nsc/symtab/Types.scala
|
|\ |
|
| | |
|
| | |
|