| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| | |
Copy the documentation from Map#withDefault() that get(), contains(),
iterator(), and keys() keys are not affected by withDefaultValue().
|
| |
| |
| |
| | |
To get the same benefit as in Range. Review by @prokpec.
|
|/
|
|
|
|
|
|
|
|
|
| |
This makes code like
0 to 100 foreach (x += _)
as fast as (often faster than, in fact) a while loop. See the
comment in Range for the gory details. More investigation should
be done regarding total impact on inlining behavior.
Review by @odersky.
|
|\ \ \
| | | |
| | | |
| | | | |
'fedgehog/docs_fix_for_scala.Either.cond___SI-5113' and 'kepler/ticket/5266' into develop
|
| | |/ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
| |
Nobody should be deprecating methods without ensuring that the
implementation doesn't rely on their existence (and the documentation
doesn't still suggest using them.) Made it more internally consistent.
|
|\ |
|
| |
| |
| |
| |
| | |
A bit further down Option's slippery slope of collections methods, but
those sudden implicit conversions to Iterable are legitimately annoying.
|
|/ |
|
|
|
|
|
|
| |
Change scaladoc links in collection classes to point at re-formatted
Collections Overview on docs.scala-lang.org. Fix minor typo:
s/Ummutable/Immutable
|
|
|
|
| |
"The Scala 2.8 Collections API" overview.
|
|\ \
| | |
| | |
| | | |
'ijuma/feature/signum' into develop
|
| |/
| |
| |
| |
| |
| |
| |
| | |
The Java implementation is faster as it doesn't have branches.
java.lang.Math includes implementations of signum for Double and Float,
but I didn't change the ones in scala.math because there is a difference
on how negative zero is handled.
|
|/
|
|
| |
and :+, plus one for ++:.
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
'dcsobral/parserFilter', 'soc/library-range-sum', 'szeiger/feature/enumeration-valueset', 'szeiger/issue/5117' and 'jsuereth/pull-binary-error-message' into develop
|
| | | | |
| | | | |
| | | | |
| | | | | |
Closes SI-5117.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- Make Enumeration.ValueSet a SortedSet and back it by a BitSet
- Add toBitMask and fromBitMask methods for value sets
- Add an Ordering for the values
- Deprecate names seq in the Enumeration constructor
- Add + method to Value for easy ValueSet creation
|
| | |/ /
| | | |
| | | |
| | | | |
Partially fixes SI-4658. NumericRange stays slow, thanks to the brilliant idea that Numeric doesn't need a division operation.
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | | |
Complement map and flatMap when used in for comprehensions. This is
required when pattern matching is used on the result of the generators.
It is implemented through a new filterWithError method on ParseResult.
|
|/ /
| |
| |
| | |
Can be used to reliably override the default no success messages.
|
|/
|
|
|
| |
Using java.lang.Long.bitCount for the size computation is a lot faster
than the previous Scala implementation. Closes SI-2196.
|
|\ \
| | |
| | |
| | | |
into develop
|
| |/ |
|
|/ |
|
|\ \
| | |
| | |
| | | |
'remotes/odersky/topic/reify', 'remotes/robinst/master' and 'remotes/szeiger/bitset' into pending
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Mutable and immutable BitSets now extend SortedSet, using a fixed
Ordering.Int and an efficient bit mask based rangeImpl()
- fromArray methods in both implementations are deprecated in favor of
new fromBitMask and fromBitMaskNoCopy methods
- New toBitMask method for converting bit sets back to Array[Long] bit
masks
- immutable.BitSet uses a more efficient Builder, based on
mutable.BitSet (closes SI-4647)
- Delete scala.tools.nsc.util.BitSet (not used anywhere)
Review by @odersky
|
|/
|
|
| |
emptyValDef has special meaning in the compiler, so reify needs to preserve it by identity and not just by structure.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Yreify-copypaste: the copy/pasteable mode for reification
When experimenting with macros, I've found out that it's helpful to
use the reifier to find out what Scala idioms map to what Tree shapes.
However, stuff emitted by -Yreify-debug is too verbose, that's why I
decided to put up a human-readable dumper.
To use the dumps, you need to first import the following things:
import scala.reflect.api._ import scala.reflect.mirror._ import
scala.reflect.api.Modifier._ import scala.reflect.internal.Flags._
The stuff is really experimental, e.g. the tension between flags and
modifiers needs to be thought out and addressed. Review by odersky.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A remedy for an IllegalAccessError where generated bytecode referred to
an inaccessible type. Closes SI-1430.
Bonus materials:
- tore out all the invokedynamic support. The shipped jdk7
implementation shows limited resemblance to the one this was written
against; the code mostly serves to distract. (I think I could get
invokedynamic working pretty quickly, except that it would
mean having a codebase for java7 and one for 5-6, which is not a yak
I wish to shave today.)
- gave NullClass and NothingClass objects of their own, which
allowed a nice polymorphic simplification of isSubClass, plus a
couple other streamlinings.
|
|
|
|
|
|
|
| |
Had AnnotationInfo extend Product3 since it's no longer a case class.
Tried to make reflection a little more robust. Closes SI-5223, review by
vogt.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trying to make hashcodes faster. Didn't achieve much on that front, so
redirected into structural/consistency issues. The latter was lacking
in terms of how/where "def seq" was defined. The documentation I can
find doesn't give me much hint that the sequential form of my sequential
collection might be a single-use iterator! (As in StringOps, ArrayOps.)
If that's intentional it should be in huge letters. I'm assuming for now
that it wasn't.
Also, there was this:
GenMapLike: def seq: Map[A, B]
GenSetLike: def seq: Set[A]
GenSeqLike: // nothing, returns Traversable
So I added some def seqs where I needed the more specific types for
my hashcode work. Hashcodewise, I broke the MurmurHash3 object into
a reusable class and a collections-specific object, and I deprecated
the methods which took GenTraversableOnce in favor of ones taking
TraversableOnce, because there's no reason the hashcode library should
have to know about things like "make sure to call seq before you
traverse or you'll be sorry." Exclude things by their type and you can
never make a mistake. End transmission.
|
|
|
|
|
|
| |
Preparations for new version of AbstractPartialFunctions that also does
isDefinedAt correctly. Should be a new starr. Review by extempore.
|
| |
|
|
|
|
|
|
|
| |
First part of campaign to make orElse on partial functions faster than
exponential. In fact, now it's linear, with zero overhead for the common
case. Review by extempore.
|
|
|
|
|
|
| |
Move allDeclarations to make it available to all types, like
declaration(...). Review by odersky.
|
|
|
|
|
|
|
| |
Partial cleanup and generalization of tree printing. You can now print
a tree in direct case class form with `showRaw(tree)`. Should make
NodePrinters redundant.
|
|
|
|
|
|
|
|
|
| |
There's every hint that it's a requirement that a TypeApply have
non-empty typeArgs, but testing for and handling the empty condition
is done irregularly. Made a mkTypeApply which handles the isEmpty case
(returning "fun" unchanged.) Also unified most of the variations of
casts under one umbrella. Review by moors.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Changes the fork join pool detection for JVM1.7, for actors and parallel
collections libraries.
Review by phaller.
|
|
|
|
|
| |
Small changes to reflection prompted by code review.
|
|
|
|
|
| |
Removed reflect.{Type, Symbol, Tree, Print} for good.
|
|
|
|
|
|
|
| |
(1) Made ReflectionUtils an object, to take its members out of the
reflect package. (2) Removed old Type/Symbol/Tree from reflect package.
(3) Got scratchpad to work better. Review by extempore.
|
|
|
|
|
|
|
|
|
| |
Some philistine who thinks "binary compatibility" is a computer dating
site changed the names of public vals in Predef classes. I restored and
then deprecated them.
REVIEW BY MOORS.
|
|
|
|
|
|
|
| |
Misc cleanups associated with the previous commits: limiting overly
expanded types, fixing externally visible types for scaladoc, utilizing
abstract collection classes where possible, etc.
|
|
|
|
|
| |
Changes to library code outside the collections.
|