| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Eliminating allocations.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
At this commit the statistics when compiling src/library
are as follows. These counts are precise, collected by a
modified Function1 which counts every instantiation of every
implementing class. The net result is 27 million fewer
allocations, over a 20% drop.
// master (5b5635ee9d), total and top five by count:
Total Function1 allocations: 128,805,865
scala.collection.immutable.$colon$colon 26781958
scala.collection.mutable.ListBuffer 15365174
scala.collection.TraversableLike$$anonfun$map$1 9127787
scala.collection.generic.Growable$$anonfun$$plus$plus$eq$1 4636154
scala.collection.mutable.StringBuilder 3531211
// After these commits, total and top five by count:
Total Function1 allocations: 101,865,721
scala.collection.immutable.$colon$colon 26993704
scala.collection.mutable.ListBuffer 15319656
scala.collection.TraversableLike$$anonfun$map$1 7585019
scala.reflect.internal.Types$MethodType$$anonfun$paramTypes$1 2447307
scala.reflect.internal.Types$SubstSymMap 2436088
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
++= on a linear sequence can be accomplished without
closure allocation.
|
|\ \
| | |
| | | |
New starr based on b7840d6b41.
|
| | |
| | |
| | |
| | |
| | | |
Seven weeks is a good amount of time between starrs,
and I'm going nutso for -Xdev during locker.
|
|\ \ \
| | | |
| | | | |
showRaw can now print positions
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
enclosures are now strongly typed and are no longer vals
|
| |/ / / |
|
|\ \ \ \
| | | | |
| | | | | |
the scanner is now less eager about deprecations
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Due to some reason, partest always enables -deprecation. Since Paul has
just submitted a pull request, which removes this behavior, I'm updating
the flags to make sure this test works even after Paul's change.
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | | |
When healing braces it isn't very useful to report deprecation warnings,
especially since this process is just simple context-free skimming, which
can't know about what positions can accept what identifiers.
|
|\ \ \ \
| | | | |
| | | | | |
fixes the typedIdent problem for good
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | | |
Previous attachment retaining fix was only working for Idents which
get turned into Selects. Now it works for all transformations applied
to Idents (e.g. when an ident refers to something within a package obj).
|
|\ \ \ \
| | | | |
| | | | | |
Moves annotationError outside typedAnnotation
|
| |/ / /
| | | |
| | | |
| | | |
| | | | |
This refactoring allows everyone from the compiler, e.g. the macro engine
which expands annotation-emitting macros, to produce annotation errors.
|
|\ \ \ \
| | | | |
| | | | | |
macro expansions are now auto-duplicated
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The fix still requires macro developers to be careful about sharing trees
by references, because attributed DefTrees will still bring trouble.
However this is an improvement, because it doesn't make matters worse
and automatically fixes situations similar to one in the test.
A much more thorough discussion with a number of open questions left:
http://groups.google.com/group/scala-internals/browse_thread/thread/492560d941b315cc
|
|\ \ \ \
| | | | |
| | | | | |
adds extractors for TypeName, TermName and Modifiers
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This change allows to pattern match over type names, term names and
modifiers. Otherwise it can be quite painful to match over complex trees
as each name or modifiers requires a guard.
This pull request also changes the name of default constructor for term
and type names i.e. TypeName(s) instead of newTermName(s). This is
shorter to type, more consistent with the rest of reflection api and
consistent with the way it will be pattern matched later on.
|
|\ \ \ \
| | | | |
| | | | | |
renames c.fresh to c.freshName
|
| |/ / / |
|
|\ \ \ \
| |_|/ /
|/| | | |
adds Tree.nonEmpty
|
| |/ /
| | |
| | |
| | | |
So that trees become consistent with isEmpty on lists and options.
|
|\ \ \
| |_|/
|/| | |
uniform dealiasing and widening
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In 658ba1b4e6 some inference was gained and some was lost.
In this commit we regain what was lost and gain even more.
Dealiasing and widening should be fully handled now, as
illustrated by the test case.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I determined that many if not most of the calls to .normalize
have no intent beyond dealiasing the type. In light of this I
went call site to call site knocking on doors and asking why
exactly they were calling any of
.normalize
.widen.normalize
.normalize.widen
and if I didn't like their answers they found themselves
introduced to 'dropAliasesAndSingleTypes', the recursive widener
and dealiaser which I concluded is necessary after all.
Discovered that the object called 'deAlias' actually depends
upon calling 'normalize', not 'dealias'. Decided this was
sufficient cause to rename it to 'normalizeAliases'.
Created dealiasWiden and dealiasWidenChain.
Dropped dropAliasesAndSingleTypes in favor of methods
on Type alongside dealias and widen (Type#dealiasWiden).
These should reduce the number of "hey, the type alias doesn't work" bugs.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Like the comment says:
// This way typedNew always returns a dealiased type. This
// used to happen by accident for instantiations without type
// arguments due to ad hoc code in typedTypeConstructor, and
// annotations depended on it (to the extent that they worked,
// which they did not when given a parameterized type alias
// which dealiased to an annotation.) typedTypeConstructor
// dealiases nothing now, but it makes sense for a "new" to
// always be given a dealiased type.
PS:
Simply running the test suite is becoming more difficult all
the time. Running "ant test" includes time consuming activities
of niche interest such as all the osgi tests, but test.suite
manages to miss the continuations tests.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Investigating the useful output of devWarning (-Xdev people,
it's good for you) led back to this comment:
"normalize to get rid of type aliases"
You may know that this is not all the normalizing does.
Normalizing also turns TypeRefs with unapplied arguments
(type constructors) into PolyTypes. That means that when
typedParentType would call typedTypeConstructor it would
find its parent had morphed into a PolyType. Not that it
noticed; it would blithely continue and unwittingly discard
the type arguments by way of appliedType (which smoothly
logged the incident, thank you appliedType.)
The simplification of typedTypeConstructor:
There was a whole complicated special treatment of AnyRef
here which appears to have become unnecessary. Removed special
treatment and lit a candle for regularity.
Updated lots of tests regarding newly not-so-special AnyRef.
|
|/ /
| |
| |
| |
| | |
Another "attractive nuisance" burning off time until I
realized it was commented out.
|
|\ \
| | |
| | | |
SI-6745 Fix <init> lookup
|
| | |
| | |
| | |
| | |
| | |
| | | |
We should only consult the decls of the enclosing
class. Members of the self type, enclosing scopes,
or imports should not be considered.
|
|\ \ \
| | | |
| | | | |
Removed old pattern matcher.
|
| | |/
| |/| |
|