| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
SI-6908 Makes FlatHashTable as well as derived classes support nulls
|
| |
| |
| |
| |
| |
| |
| |
| | |
Uses pattern matching in findEntry instead of an if.
Uses a named object NullSentinel instead of a val.\
Makes NullSentinel private.
Uses isInstanceOf instead of equality on NullSentinel.
Makes searchEntry a val instead of a var.
|
| |
| |
| |
| |
| | |
In my main commit I missed the scala doc annotation about not
being able to store null.
|
| |
| |
| |
| |
| |
| |
| | |
This change adds a null sentinel object which is used to indicate that a null
value has been inserted in FlatHashTable. It also makes a strong distinction
between logical elements of the Set vs entries in the hash table. Changes
are made to mutable.HashSet and ParHashSet accordingly.
|
|\ \
| | |
| | |
| | |
| | | |
magarciaEPFL/unnest-closures-supplementErrorMessage
nested closures are flattened by calling supplementErrorMessage() directly
|
| | | |
|
| | |
| | |
| | |
| | | |
A closure C that becomes an argument to the constructor of another closure makes both closures harder to eliminate (either by scalac-optimizer or JIT-compiler) than is the case when C is the argument to an @inline method.
|
|\ \ \
| | | |
| | | | |
fusion of loops in Range.foreach() and Range.validateRangeBoundaries()
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit allows closure elimination in more cases. The non-inlined case also benefits from saving a Range.validateRangeBoundaries() invocation.
Before this commit, the closure argument to Range.foreach() escaped to Range.validateRangeBoundaries(). As a consequence, closure elimination required inlining both of them. Given that the current optimizer duplicates a closure body whenever that closure's apply() is invoked, the resulting code size taxed the JIT compiler. In particular when apply() delegates to a specialized version, or when a bridge apply() stands in the way.
|
|\ \ \ \
| | | | |
| | | | | |
bind + argc specialization = 20x perf boost
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
First of all the typo I have made when migrating from manifests to tags.
`repr.getClass` in `WrappedArray` should read `array.getClass`.
Secondly manifests for Any, Object/AnyRef, AnyVal, Null and Nothing
now have their `newArray` methods overridden to avoid reflective overhead
of array instantiation.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Default logic of mirror construction, which gets triggered via
reflectField/reflectMethod/reflectConstructor, validates a lot of facts
about its arguments.
This takes quite a bit of time, which significantly degrades performance
of reflection-heavy applications. Proposed two changes provide an order
of magnitude performance boost to a simple app, which repeatedly invokes
the same method for different receiver instances.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix Iterator#copyToArray (fixes SI-6827).
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
As pointed out in #scala, when using a non-zero start it's possible
to get an ArrayIndexOutOfBoundsException due to an incorrect bounds
check. This patch fixes this, as well as another potential bounds
error, and adds test cases.
Incorporates some other suggestions by Som-Snytt to ensure that
callers will get useful error messages in cases where the start
parameter is wrong (negative or out-of-array-bounds).
Review by @som-snytt.
|
|\ \ \ \ \ \
| |_|_|_|_|/
|/| | | | | |
Align copyright years
|
|/ / / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
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
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|