Commit Graph

14295 Commits

Author SHA1 Message Date
kzys 48ae5a27af Fixes #4490 and #4467. Contributed by Simon Ochsenreither. Review by dubochet.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25103 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-18 14:21:47 +00:00
kzys 586f0bf39b Fixes typo in ScalaDoc: IndexOutofBoundsException => IndexOutOfBoundsException. Contributed by Simon Ochsenreither. Review by dubochet.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25102 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-18 13:52:29 +00:00
extempore da21203e59 Took a hint from -Xcheckinit to make some pattern matcher code
init-order consistent.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25101 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-17 11:18:36 +00:00
extempore 676685cb71 Go back to printing the message that transcript pastes can be
finished with ctrl-D.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25100 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-16 19:40:59 +00:00
extempore 6d0083fc28 Deprecated scala.reflect.generic, except for ByteCodecs.
After we move some non-internal things out of scala.reflect.internal
we should go back and improve some deprecation messages (i.e. point
somewhere useful.) No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25099 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-16 19:40:40 +00:00
extempore 7ed60f1b8a Suppressing the ability to suppress stack trace suppression in
NonLocalReturnControl for performance reasons, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25098 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-16 16:01:10 +00:00
extempore 8fbe4227a2 Fix for that slightly not compiling previous patch, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25097 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-16 15:39:40 +00:00
extempore 3ff9002a76 Speeding up stack trace suppression. Review by dragos.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25096 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-16 15:35:04 +00:00
extempore 74fe975aab Eliminating accumulated dead ends from the pattern matcher.
No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25095 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-16 03:22:59 +00:00
extempore 0998d632bf Triumph over various unsolved mysteries of the pattern matcher.
More elimination of redundant ways of doing things.  More allowing
the typer to do its typing thing.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25094 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-16 01:45:19 +00:00
extempore 8bf6f83704 Bytecode inspection reveals the pattern matcher leaving a lot more
redundancy in generated trees than is necessary.  Added more inteligence
to the process.  Review by dragos.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25093 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-15 23:20:35 +00:00
moors c1ebd4526b closes #4692: unification in type constructor inference now widens *and* dealiases when necessary
in 2.8.1 implicit conversion search started with a widened type, so that combo never came up

no review

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25092 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-15 16:32:38 +00:00
moors c91e0d1534 got rid of grotesque isCompat closure in exprTypeArgs and friends. no review
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25091 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-15 14:45:33 +00:00
extempore 2901fad3f0 A last little IO cleanup, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25090 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-14 22:48:37 +00:00
extempore b16ca702ec Update manually created tree which was calling Predef.error
to call scala.sys.error instead.  Created convenience functions
in Definitions for getting package objects akin to those for
getting classes and objects.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25089 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-14 22:48:22 +00:00
extempore 70b79b8e60 More batched performance improvements for io.{ File, Classpath } and
others in the neighborhood.  Avoids calling the expensive
getCanonicalPath in favor of getAbsolutePath: I note that because
it has the potential to change compiler behavior at the borders.
No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25088 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-14 16:34:02 +00:00
moors ae6f3912d8 closes #4547. parts now also looks in HasMethodMatching-style refinedtype's, so that the argument types of the method we're looking for contribute to the implicit scope.
review by rompf -- odersky may want to take a quick look and update the spec

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25087 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-14 12:41:48 +00:00
extempore ca79199631 Documented what I could figure out about late flags and anti-flags.
Eliminated some indirection in flag usage.  Made -Xshow-phases print
out more info about flags if -Ydebug is also given.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25086 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-14 02:26:07 +00:00
extempore 153df7a4b1 Performance tweaks for AbstractFile, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25085 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-14 02:25:48 +00:00
extempore eb7327eac0 Test case for implicits which unwrap typeclasses, something which
must really live on the edge given the multiple ways we've busted
it lately.  Also some Array/signature and repl tests.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25084 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-13 20:51:57 +00:00
extempore 2acedb2c75 Views using methods implemented in terms of isEmpty (in particular,
headOption and lastOption) were traversing the collection twice up
to the nonEmpty element, because "if (isEmpty) None else Some(head)"
means calling isEmpty separately from head. I overrode those methods in
TraversableViewLike to avoid the second traversal.

This leaves at least init and tail still in that boat, but they were
getting too involved.

How do I say "review by pool of reviewers", who can help set that up? In
the meantime no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25083 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-13 20:51:39 +00:00
extempore 114c53573f Marked some more by-name-argument-using methods with final @inline
to make possible and then encourage their inlining.  Knocked almost
300 more classfiles and 200K off the compiler jar.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25082 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-13 18:04:20 +00:00
extempore 741a863fbd In the interests of unbreaking the ide, changing the reporter
type in the repl to ConsoleReporter.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25081 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-13 02:19:38 +00:00
extempore b51fc8c7f8 Revert r24960, "Change Types#narrow to create an existential rather than a refinement type."
For many days I have been haunted by the knowledge that the 20 seconds
I took off quick.comp between r24893 and r24920 all came roaring back
around r24960 for no reason which I could discern. To verify r24960 was
not at fault I had compared it against r24959 more than once, and the
difference was negligible.

It was negligible, that is, until I compared under -optimise, and then
the wheels came off. In fact the differences there are so spectacular
(quick.lib under -optimise goes from 8:50 to 4:26 with this patch,
quick.comp from 8:34 to 6:30) that there must be some major disconnect
between what the benchmark charts are measuring and what I am measuring.

In any case, the charts and I do agree on the direction of the arrow.
For reasons which remain to be determined, this commit was bad on the
nanos. Review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25080 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-12 20:08:48 +00:00
kzys bee097eaaa We migrated the Scala wiki from Trac to Confluence. Review by rytz.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25079 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-12 12:28:19 +00:00
kzys 0c66babada We rename Trac and start using JIRA as the issue tracking system.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25078 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-12 05:24:46 +00:00
kzys ff44a4aaef The '#' sign may easily to lead to problems, So we use '_' instead of '#'. Closes #4641.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25077 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-12 05:18:31 +00:00
extempore 6661409c7a Disabled the addition to isImpossibleSubType which prevents
scalaz from building with trunk.  Not sure what should happen
with it; review by rompf.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25076 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-12 02:25:41 +00:00
extempore 45801b3684 Don't issue unchecked warnings on higher-kinded types.
Closes #1439, review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25075 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-12 02:25:26 +00:00
extempore c37d2b8eb6 Fix for wrong results from groupBy on views. Closes #4660, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25074 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-12 02:25:07 +00:00
extempore 1750815064 Reverts r25051 due to witnessed movement of scalaz in the noncompiling
direction.  Postmortem help I hope in the review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25073 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-12 02:24:51 +00:00
extempore 082a4b22b9 Informs the bootstrap code which preferences certain source files about
EmbeddedControls.scala, necessary so that starrs from trunk can be used
to build scala-virtualized.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25072 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-11 20:33:09 +00:00
extempore 1ed96c8100 A third round of optimizations from Tiark, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25071 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-11 20:32:55 +00:00
extempore afd50019fb A few additional (but less dramatic) optimizations to implicit search,
courtesy of Tiark.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25070 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-11 20:32:35 +00:00
extempore c1f6be38c3 Tiark's main batch of optimizations to implicit search. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25069 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-11 20:32:18 +00:00
extempore d5fa042fc9 Making some recent changes less breaky so sbt can be used with trunk again.
Mainly, renamed scala.reflect.internal's AbstractFile to AbstractFileType.
I can't see a way around renaming it and it's becoming quite a problem not to
have sbt.  I inspected scala-ide and I don't think this is going to break it,
but in general I don't know how plausible it is that we can avoid periodic
breakage given that we have at least three source bases (scala, sbt, scala-ide)
each with multiple branches with interdependencies which are not being
continuously integrated.  Review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25068 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-11 10:17:49 +00:00
extempore 4852d2dc62 A test case demonstrating some of the issues with DelayedInit.
References #4680.  Review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25067 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-10 22:38:17 +00:00
extempore b97a492449 Compilation of spec-List enters an infinite loop under -optimise,
disabling in the hopes of seeing a new build before I die.  I'll put
it back.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25066 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-10 18:42:56 +00:00
extempore 9b113642b6 Tweaks repl tests to enforce -Yrepl-sync and other setup on all
clients.  Also includes some more why-do-tests-hang bosons for the
particle accelerator in case that doesn't wrap it up.  I think it
will though, because now constrained-types is the only one which
failed and it's also the only one which overrides Settings.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25065 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-10 17:32:05 +00:00
extempore 7b7b62a42a Reverts r25036, "Altered the positioning of XML literal trees"
because the IDE did not like it.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25064 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-10 16:27:55 +00:00
extempore 519bed96e0 A somewhat more realistic attempt to fix the build, no review.
This introduces a repl command line option -Yrepl-sync to inhibit
the asynchronous path which makes repl startup seem so snappy.
And then it uses it in the repl tests.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25063 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-10 15:01:13 +00:00
extempore 2b68fbeac3 First of what might be several attempts to fix the build, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25062 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-10 13:12:46 +00:00
extempore 9ec7560243 Modified erasure not to generate instance tests for statically known
types. It appears the production of types like "Foo with Bar" in the
pattern matcher (where the scrutinee is known to be Foo) has been a
major contributor of suboptimal pattern matches. I will also fix it in
the matcher, but it makes sense to catch it in erasure as both a check
on the matcher and because they may come from elsewhere too. Review by
odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25061 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-07 18:06:34 +00:00
extempore 7307d1e2c4 Lisp test wins again, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25060 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-07 06:09:15 +00:00
extempore 8690cc53b4 Proliferating the number of debugging modes because it's still way
too hard to see what's going on in there.  Until we get hubert's type
debugger with its whiz-bang whizbanginess, we'll have to struggle
along with somewhat prettier ascii.  This introduces:

  -Yinfer-debug

which tries to print in readable fashion what is happening in the worlds
of inference and implicit search.  It should be made a bit more complementary
and less overlappy with -Ytyper-debug.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25059 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-06 23:53:50 +00:00
extempore f48bc09fb3 Realized most of the remaining methods in Option warrant @inline
and final treatment and modified them accordingly.  Review by dragos.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25058 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-06 23:53:24 +00:00
extempore 00f1d317d1 Working on the inliner, discovered that a few key methods are
not inlined.  With this commit there are 326 fewer classfiles
generated under -optimise.  Use getOrElse with even wilder abandon
than you were previously.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25057 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-06 02:34:53 +00:00
extempore 9e55c7dbf4 Carved out access exception for java protected statics, which
otherwise cannot be accessed from scala.  Changes close status
of #1806, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25056 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-06 01:00:48 +00:00
extempore a5ee510e18 A few more items so that all may enjoy power mode in the
way nature intended.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25055 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-03 08:24:09 +00:00
extempore af61027ad0 More polishing up repl power mode, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25054 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-03 08:21:22 +00:00