| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
An IntelliJ Module for the recently modularized REPL.
|
| | |
|
|\ \
| | |
| | | |
Sanity for build.xml: exscriptus&positus delendus est.
|
| |\| |
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | | |
Merges the relevant part of #2295 (build.xml cleanup),
with the relevant differences in build.xml carried forward,
as well as a fix in interactive/RangePositions for the sbt interface.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Use `ant -Dstarr.version="2.11.0-M2" -Dlocker.skip=YESSIR`,
to build quick using 2.11.0-M2 (skipping locker, using starr instead).
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Reduced copy/pasting to the best of my antabilities.
The next person to duplicate anything without written
permission will be sentenced to a week in xmhell.
While I was at it, made sure that layering is respected.
The quick phase exclusively uses the locker compiler for building.
The jar task will fail when trying to create an empty jar.
Replaced the crazy if/unless/depends constructs by if/then/else.
Version suffix computation should now be comprehensible.
I threw in some validation to make sure the various suffixes are consistent.
Also, no more init/pre-foo tasks unless absolutely necessary.
Introduced a couple of macros to capture the essence of staged compilation.
Notes:
- remove lib.extra, standardize on aux.libs
- collapse *.javac.path and *.build.path
- rename starr.classpath to starr.compiler.path
- only repl needs jline, locker.compiler.path = locker.comp.build.path + forkjoin
- more uniform build.paths (compiler = reflect + library)
- uniformity means slightly bigger classpaths
(e.g. forkjoin is only used in library, but inherited by compiler)
- pruned: some spurious dependencies removed
- compilerpathref = compiler build path
- silence test.osgi, by hook or by crook
- centralized clean tasks
- reduce duplication in property usage
- fix pack.xml to pack scaladoc/partest instead of scaladoc/scala-partest
- TODO: -XDignore.symbol.file necessary for library? only needed for forkjoin?
- document usage from jenkins, fix typo: partest.scalac*_*opts
New targets:
- quick-opt
- strap-opt
- test.bc
- test.osgi
- test.osgi.comp
- test.osgi.init
- test.stability-opt
Removed/replaced targets:
- asm.clean asm.lib asm.start
- bc.run
- dist.latest dist.latest.unix dist.latest.win dist.start
- docs.all docs.manmaker docs.pre-comp docs.pre-continuations-plugin
- docs.pre-jline docs.pre-lib docs.pre-man docs.pre-partest docs.pre-scalap
- forkjoin.clean forkjoin.lib forkjoin.pack forkjoin.start
- graph.clean
- init.build.nopatch.release init.build.patch.release init.build.release
- init.build.snapshot init.build.suffix.done init.extra.tasks
- init.fail.bad.jdk init.hasbuildnum init.hasmavensuffix init.jars
- init.jars.check init.maven.jars init.maven.tasks init.osgi.suffix
- init.osgi.suffix.final init.osgi.suffix.snapshot init.testjava6
- init.version.done init.version.git init.version.release init.version.snapshot
- init.warn.jdk7 locker.pre-comp locker.pre-lib locker.pre-reflect
- locker.unlock.comp locker.unlock.lib locker.unlock.pre-comp
- locker.unlock.pre-lib locker.unlock.pre-reflect locker.unlock.reflect
- osgi.clean osgi.test osgi.test.comp osgi.test.init
- pack.clean pack.pre-bin pack.pre-comp pack.pre-lib pack.pre-partest
- pack.pre-plugins pack.pre-reflect pack.pre-scalap pack.start
- palo.comp palo.lib palo.pre-bin palo.pre-comp palo.pre-lib palo.pre-reflect
- palo.reflect palo.start quick.pre-bin
- quick.pre-comp quick.pre-interactive quick.pre-lib quick.pre-partest
- quick.pre-plugins quick.pre-reflect quick.pre-repl quick.pre-scalacheck
- quick.pre-scaladoc quick.pre-scalap
- sbt.clean sbt.compile sbt.done sbt.libs sbt.start
- starr.clean
- strap.clean strap.pre-comp strap.pre-lib strap.pre-reflect strap.start
- test.debug test.pre-run
|
|\ \ \ \
| |_|_|/
|/| | | |
SI-7294 Towards finality for TupleN
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The motivation is to provide static warnings
in cases like:
scala> (1, 2) match { case Seq() => 0; case _ => 1 }
res9: Int = 1
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For the purposes of checkability warnings. This will
warn in case of:
scala> (1, 2) match { case Seq() => 0; case _ => 1 }
res9: Int = 1
Given how often Tuples are used as scrutinees, this is
a highly desirable place to warn.
I was orginally going to unlock this under -Xlint, and
could be easily convinced to go that way, given that
-Xfuture is a less popular option.
|
|\ \ \
| | | |
| | | | |
Remove unrecognized doc comments
|
| | | |
| | | |
| | | |
| | | |
| | | | |
unmoored doc comment" warning when building distribution for
scala itself.
|
|\ \ \ \
| | | | |
| | | | | |
script engine : better binding mechanism + reflexive access through bound variable "engine"
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Better binding mecanism : formerly done through the default SimpleBindings
shipped with the API, it now goes through a custom IBindings class
which uses the bind method of the interpreter instead of simply
making the bindings available as a Map.
Reflexive access : the script engine is made available to itself
through a bound variable "engine" of type javax.script.ScriptEngine.
This will allow "variable injection" i.e. programmatic redefinition
of variables, among others.
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-5717 error when bytecode cannot be written
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
If there's an existing file foo when emitting a class file for foo.Bar,
then emit an error at foo.Bar, similar to what javac does.
The error message looks something like:
foo.scala:4: error: error writing object Foo: ./mypkg/Foo.class: ./mypkg is not a directory
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
SI-6123: -explaintypes should not explain errors which won't be reported, new attempt
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Positive testcases compile reduced known offenders to verify that no output is
produced.
The negative testcase tests that -explaintypes actually produces output on code which fails
to compile. I have altered an existing testcase, `test/files/neg/abstract`,
adding -explaintypes to the flags.
This testcase is currently mostly ineffective, as partest currently ignores the
standard output (SI-7003). It will become more effective when SI-7003 is fixed.
But already now, testers would at least be able to notice extraneous output.
This argument is somewhat bogus, but this patch is no worse than the other ones
which are committed while SI-7003 is open.
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
-explainTypes means that only type tests which *fail* should be reported in more
detail by using explainTypes. Hence, callers of explainTypes should check if
type errors are being ignored, by checking context.reportErrors. Hence, this
check is added to Inferencer, and another call site is redirected to that
method.
Moreover, explainTypes should only be called if an error exists. Enforce that in
checkSubType, and remove spurious home-made explainTypes output.
Finally, in ContextErrors, stop checking `settings.explaintypes.value` before
calling `explainTypes` which will check it again.
Note that this patch does not fix all occurrences, but only the ones which
showed up during debugging. The other ones never cause problems, maybe because
they occur when contextErrors is in fact guaranteed to be true. We might want to
fix those ones anyway.
This fixes regressions in c800d1fec5241ed8c29e5af30465856f9b583246 and
78f9ef3906c78413ff8835fdad3849bfe5516be2.
Thanks to hubertp (Hubert Plociniczak) for the first round of review.
Refs #6123
backport to _2.10.x_
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-7102 Override isEmpty for bitsets with an efficient implementation
|
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Currently bitsets use default isEmpty implementation inherited from
Set, which tests for "size == 0".
Calculating the size of a word in a bitmap requires summing through
all bits set, whereas testing for emptyness needs only one comparison
with zero.
This commit overrides the default implementation with the specialized
one looking for a non-zero word in this bitmap.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Warnings removal and other cleanup.
|
| | | | |
| | | | |
| | | | |
| | | | | |
One line of commentary referenced from nowhere can't be very useful.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Mostly unused private code, unused imports, and points where
an extra pair of parentheses is necessary for scalac to have
confidence in our intentions.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In the compiler sources this arrives with a number of false
positives, because we frequently work with strings containing
$foo where foo is an in-scope identifier. I think in normal
source code this will be less of a problem, or none at all;
but to be conservative the warning is born under -Xlint.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
removed a redundant var in JavaWriter.flagsToStr
|
| | | | | |
| | | | | |
| | | | | | |
the variable x was assigned to, but was never used.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-7236 Deprecate ThreadPoolTaskSupport and friends
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-5513: add inplace set-theoretic operations for mutable bitsets.
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Optimize RedBlackTree rebalance method by using null optimized list implementation.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
rebalance method relies heavily on s.c.i.List. By replacing List with null
optimized version, NList, rebalance operation is significantly more faster.
Test indicate +10 % performance improvement for tree sizes >= 100.
Existing tests verify red-black tree invariants, including operations
involving tree rebalance.
|
|\ \ \ \ \ \ \ \ \
| |_|_|_|/ / / / /
|/| | | | | | | | |
SI-7247, deprecate NotNull.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This was a little trickier than the previous. I introduced
a new method 'isBottomSubClass' which is the obvious complement
to the beloved 'isNonBottomSubClass'. In eliminating the two
call sites of containsNull I might have overshot the mark a
bit when I rewrote fourthTry and thirdTryRef, but who is going
to argue with such beauty as this.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Restarted the Zamboni and collected these as well.
Author was convinced by reviewer that clinging to
isNotNull like Linus's security blanket will not
help us with landing a picture of the Great Pumpkin.
YAGNI, Charlie Brown.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Removed NotNull from tests and the parentage of AnyVal.
Removed the tests which were actually testing anything to
do with NotNull; massaged the others to forget NotNull and/or
not to name local things NotNull.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Maybe this was useful in some way; but no way I ever saw.
I have comments which tell me this is exposed in the IDE so
I left a stub.
I also removed mkCheckInit. That probably sounds like it's related
to -Xcheckinit. Guess again, guy-who-thinks-names-mean-things. It
was only used by -Xcheck-null.
|
| | |_|_|_|/ / /
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
It never worked and it would periodically jump out and bite
someone. Slash and burn so new plants can take root. Eliminated
NotNullType and NotNullClass, internal elements. Removed notNull
method on Type, which no longer has a purpose. Retained 'def
isNotNull' because there are types which are known by construction
not to be null (ThisType, ConstantType as long as the constant
isn't null, etc.) and that's still useful to know.
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
Analyze constants to remove unnecessary branches
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This commit cleans up constant optimization from the review of
https://github.com/scala/scala/pull/2214 .
* drops are done using the instruction's consumed count rather than a
numeric literal
* drops are moved into one common method in the main instruction
interpreter
* One instance of x.length > y.length is replaced with
x.lengthCompare(y.length) > 0
* NaN is dealt with by treating it as an UNKNOWN
* A test is added to make sure NaN semantics aren't broken.
* The constant-optmization test is improved with tests for switch
statements
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This commit adds analysis and optimization of constants to remove
unnecessary branches. It uses abstract interpretation to determine
what constant(s) a particular stack slot or variable might or might not
hold at a given spot and uses that knowledge to eliminate branches that
cannot be taken. Its primary goal is null check removal, but it also
works for other constants.
Several tests are modified to include the new optimization phase.
Two new tests are added. One verifies that branching still works as
expected. The other verifies that branches are removed.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Restore sketchy dependency to quick.bin.
|
|/ / / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Apparently we cannot run at all without the continuations
classes on the classpath. At least that it was I conclude
from the fact that quick/bin/scala hasn't worked since
I routed the plugin classes into continuations-library.
This restores them to quick's classpath so we can have
qscala again.
|
|\ \ \ \ \ \ \ \
| |_|_|_|/ / / /
|/| | | | | | | |
SI-7228, bug in subtyping.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Diligent reviewer observed that a hot spot was possibly
being made hotter. Reviewer's suggested remedy was a
spectacular bust, but studious observation revealed the news
lash that expensive methods are expensive and we should
avoid calling them if we can.
Put short-circuit test back in front of unapply call.
Now the time spent in unapply is within a few percent.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Fixed bug in numeric widening related to continuations,
which enabled simplifying isNumericSubType.
|