| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Couldn't live with a scala.Enumeration being a permanent
fixture in the reflection library. Rolled it by hand.
|
| | | |\ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
'scalamacros/pullrequest/5334', 'scalamacros/pullrequest/5272' and 'VladUreche/issue/5287-cleanup' into develop
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
From now on, the usecases inherit the comments from their parents, such
as the explanation and the annotations: @param, @tparam, @return, etc.
An example of usecase comment inheritance is:
/**
* The test function tests the parameter param for ...
*
* @param theParam the implicit parameter to be tested for ...
* @return the result of the test
*
*
*
* @usecase def test(): Bool
*
* The test function tests the parameter taken implicitly from scope.
* Example: `test()`
*
* @return the result of the test for the current scope
*
*
*
* @usecase def test(theParam: SomeType): Bool
*
* This takes the explicit value passed.
* Example: `test(3)`
*
* @param theParam the explicit parameter to be tested for ...
*/
def test(implicit theParam: SomeType): Bool
Notice both usecases override the explanation with their own examples.
The first usecase also overrides the "@return" annotation while the 2nd
usecase overrides the "@param theParam" annotation. If they didn't
override the explanations and annotations, they would inherit the
values from the actual implementation, def test(implicit ...)
This will be followed by @inheritdoc, which enables more fine-grained
control over comment inheritance. The full explanation of using comment
inheritance and @inheritdoc and their interaction with variables is
given at https://wiki.scala-lang.org/display/SW/Tags+and+Annotations
in the "Comment inheritance" and "Inheritance Example" sections.
|
| | | | | | | | |
|
| | | | | |/ /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
New version of reification isn't susceptible to this bug.
The problem was with Code.lift generating not only a tree, but also
a manifest with the type of that tree. That led to an issue in the case
of the type of the manifest depending on a class declared inside the
quasiquote.
Now manifests in reification are gone, so is the problem.
|
| | | | | |/
| | | | |/| |
|
| | | |\ \ \ |
|
| | | | | | | |
|
| | | |\ \ \ \
| | | | | |_|/
| | | | |/| |
| | | | | | | |
'scalamacros/pullrequest/removeliftcode' into develop
|
| | | | |/ /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Major cleanup of reification:
* LiftCode phase has been removed
* Code has been deprecated and will be removed as we roll a new starr
* Logic related to type-directed lifting has been purged
scala.reflect.macro.Context#reify now provides the same services
as LiftCode provided (except that it returns Tree, not Code).
For testing purposes, I've retained the oh-so-convenient automagic lift.
test/files/codelib/code.jar now hosts Code.lift reimplemented in a macro,
so that the tests can continue working as if nothing has happened.
|
| | | | | | |
|
| | | |/ / |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Changed parameters in some tests to speed them up.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This change resolves some issues with ParCtrie splitters and their
`remaining` method, which currently evaluates the size of the Ctrie.
Since this is still not done lazily, nor in parallel, it has a certain cost,
which is unacceptable.
Change #1: The `shouldSplitFurther` method is by default implemented by
calling the `remaining` method. This method now forwards the call to the
same method in the splitter which is by default implemented in the same
way as before, but can be overridden by custom collections such as the
ParCtrie.
Change #2: ParCtrie splitter now has a `level` member which just counts
how many times the method has been split. This information is used to
override the default `shouldSplitFurther` implementation.
Change #3: The tasks and splitters rely heavily on the `remaining` method
in the splitter for most operations. There is an additional method called
`isRemainingCheap` which returns true by default, but can be overridden
by custom collections such as the `Ctrie`.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Implemented Ctrie serialization. Improved hashcode computation.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Ctrie is a scalable concurrent map implementation that supports
constant time lock-free lazy snapshots.
Due to the well-known private volatile field problem, atomic
reference updaters cannot be used efficiently in Scala yet.
For this reason, 4 java files had to be included as well.
None of these pollute the namespace, as most of the classes
are private.
Unit tests and a scalacheck check is also included.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This unclutters the namespace and makes defining custom parallel
collections a lot easier.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Concurrent (thread-safe) collections can implement builders directly
for parallel collections by having themselves as builders, similar
to buffers being builders for themselves in sequential collections.
Combining 2 shared combiners can be expensive (more than logn), but
is never done, since `combine` is always called with `this` (receiver)
combiner, so `combine` just returns `this`.
This commit adds support for implementing a parallel collection by
having itself as combiner (parallel builder). To do this, clients
must now merely implement their combiners by overriding the method
`canBeShared` and having it return `true`.
The support is implemented by refining the abstraction which creates
combiners in tasks - this abstraction is provided by the
protected `combinerFactory` method, previously `cbfactory`.
The essential difference is that if the combiner can be shared, this
method returns a combiner factory which always returns the same combiner.
Otherwise, it always creates a new combiner.
Span and takeWhile had to be modified for shared combiners to make this
work, but for all other collections they work as before.
Several other tasks had to be modified slightly, as well.
|
| | |/ /
| |/| |
| | | |
| | | |
| | | | |
added reference equality checks to updated0 and removed0 to prevent creation of a new map when updating an entry with the same value or
removing an entry that was not present to begin with.
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Conflicts:
src/compiler/scala/reflect/internal/Definitions.scala
src/compiler/scala/tools/nsc/typechecker/Namers.scala
src/library/scala/AnyVal.scala
test/files/run/primitive-sigs-2.check
test/files/run/t4172.check
test/files/scalap/abstractClass/result.test
test/files/scalap/abstractMethod/result.test
test/files/scalap/caseClass/result.test
test/files/scalap/cbnParam/result.test
test/files/scalap/classPrivate/result.test
test/files/scalap/classWithExistential/result.test
test/files/scalap/classWithSelfAnnotation/result.test
test/files/scalap/covariantParam/result.test
test/files/scalap/implicitParam/result.test
test/files/scalap/paramClauses/result.test
test/files/scalap/paramNames/result.test
test/files/scalap/sequenceParam/result.test
test/files/scalap/simpleClass/result.test
test/files/scalap/traitObject/result.test
test/files/scalap/typeAnnotations/result.test
test/files/scalap/valAndVar/result.test
test/files/scalap/wildcardType/result.test
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
ScalaObject. Undoing wrong fix in ExtensionMethods.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Without the change,
val x: List[String] with Ordered[String] = null
would be illegal. The change is reflected in my local copy of the spec. Where it now says in the section of conformance:
\item For every non-bottom class type $T$, $\mbox{\code{scala.Null}} \conforms T$, unless
$T \conforms \mbox{\code{scala.AnyVal}}$ or
$T \conforms \mbox{\code{scala.NotNull}}$.
|
| | | | |
| | | | |
| | | | |
| | | | | |
This should be a new starr.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Disabled failing scaladoc test rather than fixing it because they're too
hard to fix, even though it is almost certainly a trivial output change.
(The fact that I don't know for sure that it is a trivial output change
is also suboptimal.)
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
I guess I have to suck up the "C with Object" here in order
to get the "Array[T with Object]" I need in a different test.
Now all tests pass for reals.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
And with that one, I believe all tests pass.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Not too many Object/AnyRef parents, not too few.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Have to give AnyVal a constructor and simultaneously pacify both the
typer (which knows Any has no constructor) and the jvm (which mandates a
constructor must call its superconstructor.) It's the usual angle of
adding a not-quite-right tree during parsing and then finishing it
later (in this case, in AddInterfaces.)
|
|\ \ \ \ \
| | |/ / /
| |/| | | |
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Conflicts:
tools/get-scala-revision
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
So we can turn out a build string regardless of local conditions.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This allows any file to be be edited, rather than just the ones under library, compiler, actors, ...
|
| |\| | | |
| | |_|_|/
| |/| | |
| | | | |
| | | | | |
Conflicts:
tools/epfl-publish
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|