Commit Graph

14295 Commits

Author SHA1 Message Date
extempore debee3275f Some minor scaladoc tweaks and deletion of incorrect scaladoc docs,
no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25295 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-15 22:00:28 +00:00
michelou 4314d6314a scaladoc fixes and improvements
Changes to scaladoc include:

- fixed transformation of Code(text) into HTML tag <code>
- added tool tips for deprecated entities (classes, methods)
  using the 'title' attribute
- added syntax highlighting of Scala source code in generated
  <pre> blocks (CSS colors are defined in lib/template.css)

Here are several examples of highlighted Scala code:

scala.App
scala.Application
scala.Enumeration
scala.Function1
scala.Function2
scala.native
scala.Option
scala.Proxy
scala.specialized
scala.throws
scala.unchecked

scala.actors.Actor
scala.annotation.deprecatedName
scala.annotation.elidable
scala.annotation.switch

scala.collection.DefaultMap
scala.collection.JavaConversions
scala.collection.JavaConverters
scala.collection.LinearSeqLike
scala.collection.MapLike
scala.collection.SetLike
scala.collection.TraversableLike
scala.collection.immutable.NumericRange
scala.collection.immutable.Range
scala.collection.immutable.Stream
scala.collection.mutable.BufferLike

scala.concurrent.pilib
scala.io.Position
scala.reflect.BeanProperty
scala.reflect.Manifest
scala.testing.Benchmark

scala.util.DynamicVariable
scala.util.control.Breaks
scala.util.control.ControlThrowable
scala.util.control.Exception
scala.util.control.TailCalls
scala.util.logging.Logged
scala.util.parsing.combinator.testing.Tester
scala.util.parsing.json.JSON
scala.util.regexp.WordExp

scala.xml.factory.LoggedNodeFactory
scala.xml.parsing.ConstructingParser



git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25294 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-15 21:38:03 +00:00
michelou 22c15143a5 3rd round of clean ups (see r25285, r25292)
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25293 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-15 20:20:47 +00:00
michelou 9f6e8eeb14 2nd round of clean ups (see r25285)
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25292 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-15 16:25:42 +00:00
dragos 661cfc6ea9 Added the new packages to MANIFEST.MF to enable plugin builds and tests.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25287 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-15 08:51:40 +00:00
extempore cd68582584 Adding some Sets/Maps to perRunCaches, and eliminating ambiguously named imports.
Did a tour of the compiler adding a few longer-lived mutable structures
to the per-run cache clearing mechanism. Some of these were not a big
threat, but there is (almost) literally no cost to tracking them and the
fewer mutable structures which are created "lone wolf style" the easier
it is to spot the one playing by his own rules.

While I was at it I followed through on long held ambition to eliminate
the importing of highly ambiguous names like "Map" and "HashSet" from
the mutable and immutable packages. I didn't quite manage elimination
but it's pretty close. Something potentially as pernicious which I
didn't do much about is this import:

  import scala.collection._

Imagine coming across that one on lines 407 and 474 of a 1271 file.
That's not cool. Some poor future programmer will be on line 1100 and
use "Map[A, B]" in some function and only after the product has shipped
will it be discovered that the signature is wrong and the rocket will
now be crashing into the mountainside straightaway.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25286 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-14 01:27:04 +00:00
michelou 70e3df382b cleanups (scaladoc 2, deprecation warnings, trailing blanks)
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25285 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 20:31:32 +00:00
grek 0caf5ea54c Fix printing of Char constants.
Fixed bug in printing of Char Constants logic
used by Tree printers.

Fixes #4792. No review.



git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25284 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 12:13:31 +00:00
grek c30f0bf306 Get rid of structural type in Iterator.scala
Implementation of Iterator.scala defined a structural type
by mistake. By naming a class we get rid of that structural
type.

Fixes #4791. No review.



git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25283 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 11:39:16 +00:00
plocinic f9ce00fcc4 prohibit case-to-case inheritance instead of issuing warning. closes #4109. review by extempore, since it should make your life much easier in the pattern matcher
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25282 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 08:05:04 +00:00
extempore 9d327535c9 Don't enter into same line infinite recursion when erroneous
code involves a self-normalizing type alias.  Closes #3240, review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25281 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 07:07:02 +00:00
extempore 0bd1e96e5c Test case closes #3371, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25280 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 06:58:53 +00:00
extempore 3da87e0204 Test case closes #1432, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25279 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 06:58:39 +00:00
extempore 5d8be99078 Restored partest behavior of keeping output directories when run
with debugging enabled.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25278 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 06:58:25 +00:00
extempore e9922dcc52 Bounded wildcard types arising during pattern type inference can
cause unnecessary crashes.  Closes #1048, review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25277 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 06:58:04 +00:00
extempore e44b754a42 Catch type projections even when they disguise themselves as
stable via singleton bounds.  Closes #1431, review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25276 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 05:08:12 +00:00
extempore 2ec3e09aa6 A response to adriaan's last lub commit of the housekeeping and
pretty printing variety.  Non-invasive surgery, don't worry martin.
Simplified the input to lublist a bit.  Includes illustrative
test case for current brand of lub failures.  Review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25275 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 02:08:43 +00:00
extempore fffca8c709 Suppressed an error in type constructor bounds checking which
was obscuring the meaningful error to follow.  Review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25274 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 02:08:24 +00:00
extempore 0713049c3a Making power mode startup a little less glacial, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25273 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-12 21:59:11 +00:00
extempore 13ba58e706 A bunch of repl stuff. Smoothed out issues with singleton
type mismatches, for real this time.  :power mode goes to
phase typer automatically.

You can get the symbols for repl-defined names more directly:

  scala> case class Bippy(x: Int)
  defined class Bippy

  scala> intp.terms("Bippy")
  res1: intp.global.Symbol = object Bippy

  scala> intp.types("Bippy")
  res2: intp.global.Symbol = class Bippy

  scala> intp("Bippy") // tries type first
  res3: intp.global.Symbol = class Bippy

  scala> intp("scala.collection.Map") // falls back to fully qualified
  res4: intp.global.Symbol = trait Map

I changed the implicit which used to install "tpe" and "symbol"
to install "tpe_" and "symbol_" because it was too easy to do something
you didn't mean to, like calling x.tpe where x is a Manifest.

Said implicit now handles manifest type arguments, so you can get
the full translation from a manifest representation to a compiler type,
at least for simple types and only as much as manifests work, which is
not that much.  Fortunately that situation is all changing soon.

  scala> List(List(1, 2, 3)).tpe_
  res5: power.Type = List[List[Int]]

  scala> res5.typeArgs
  res6: List[power.global.Type] = List(List[Int])

Review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25272 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-12 19:43:14 +00:00
extempore 8e5dab1dc8 Fixed some unnecessary chattiness and poor function naming in tree
checkers, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25271 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-12 19:42:50 +00:00
michelou 86dfc660d8 Seeing about getting trunk building again, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25270 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-12 18:42:00 +00:00
odersky 7d97f5a86a More work done on implementing reflection. But still very mich in progress.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25269 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-12 13:32:33 +00:00
extempore 60dc5da3e3 Seeing about getting trunk building again, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25268 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-11 23:01:51 +00:00
extempore da85e3d5e5 Misc smoothing of tree creation, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25267 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-11 20:40:05 +00:00
extempore 3190280d30 Implemented workaround for SI-4789, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25266 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-11 20:39:43 +00:00
extempore 88879a9d4a Minor, mostly agreed upon changes to reflection api, review by odersky.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25265 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-11 20:39:22 +00:00
odersky 6bc4f2097d Baby-steps towards getting actual runtime reflection. Made runtime.Universe not crash when initializing.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25264 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-11 16:17:07 +00:00
prokopec 814ce56344 Fixes #4398.
Review by extempore.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25263 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-11 15:17:45 +00:00
prokopec bcfdeb8bcd Fixes #4326.
No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25262 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-11 15:17:43 +00:00
prokopec 3b3b2317b1 Fixes #4709.
Review by extempore.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25261 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-11 15:17:39 +00:00
prokopec 67190be8aa Fixes #4723.
Review by extempore.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25260 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-11 15:17:36 +00:00
prokopec bcf5198a6e Making empty streams serializable.
No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25259 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-11 15:17:34 +00:00
prokopec ea52dc51fb Fixes #4761.
This changes the signature of flatten - I do not see how to use a @bridge annotation here, since after erasure both the bridge and the original method have the same signature.

Review by extempore.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25258 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-11 15:17:03 +00:00
odersky d5db277920 Refactored reflection into reflect.api and reflect.internal. Severed the last remaining dependency on reflect.generic. Review by extempore.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25257 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-11 09:00:48 +00:00
extempore 6f820a26a0 Moved a warning behind -Xlint. Threw in a partest fix: I always
meant for --grep to look in checkfiles too, and now it does.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25256 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-09 22:52:53 +00:00
kzys 25198635b1 Fixes some remaining formatting issues. Related to #4490. Contributed by Simon Ochsenreither. Review by ureche.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25255 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-09 02:11:32 +00:00
kzys 4a7a7891fc Fix for failing test, review by extempore.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25254 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-09 02:05:06 +00:00
odersky fb0618fcc4 ByteCodecs move to reflect.internal. Some factoring out of Global.getFile.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25253 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-08 16:19:02 +00:00
phaller f334bed71d Fixes SI-4759
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25252 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-07 17:32:31 +00:00
michelou 69098fca36 fixed svn props and file headers
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25251 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-07 16:10:45 +00:00
odersky cebc25823e Made scratchpad use replToString.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25250 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-07 15:16:44 +00:00
extempore 991882f53e We have a handful of files with windows line endings amidst
thousands without them.  This kind of thing makes for unnecessary
difficulties.  I fixed everything to use unix line endings.
At some point we can enforce that with a git post-commit hook,
but until then we're on the honor system.

There are useful elaborations for users of all platforms here:

  http://help.github.com/line-endings/

No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25249 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-07 04:25:13 +00:00
extempore 915acca835 Created simple infrastructure for creating mutable sets and maps which
are automatically cleared after each compilation run. Since I am not too
familiar with the mechanics of the presentation compiler I'm not sure
this addresses the problem, or that it doesn't clear something which
shouldn't be cleared. Also, this is only a sampling of possible mutable
sets and maps: let me know if it does the job and I can expand it.

Review by dragos.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25248 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-06 17:28:04 +00:00
extempore c48d2bab12 Fixed a logic error in debuglog which was turning debugging
output into a neverending party.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25247 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-06 17:27:41 +00:00
odersky 64d5da193e Removed redundant field. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25246 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-06 15:52:04 +00:00
odersky 7336d70b80 Fixing two problems in Global.scala: crashes during logs of import completions + interruprts at possibly inconsistent states. Review by dotta.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25245 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-06 15:51:21 +00:00
extempore 97599a0069 Test case for #4737, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25244 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-06 15:44:15 +00:00
kzys 9f3ae986ba Minor fixes to Scaladoc man page. Contributed by Seth Tisue. Review by dubochet.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25243 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-06 15:41:53 +00:00
kzys e274aaa578 Add a test for #4421 and clean up a little.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25242 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-06 15:13:30 +00:00