Commit Graph

14519 Commits

Author SHA1 Message Date
heathermiller 895a5b1808 Added footer command line option to ScalaDoc so ScalaDoc users aren't forced to have the EPFL/Typesafe copyright notice in their API docs. Now comes with the ability for users to add their own footer. Review by ureche.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25616 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-09-07 05:18:37 +00:00
heathermiller 7b5f6777d0 Improves the usability of Scaladoc when images are not available. Closes SI-4943.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25615 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-09-06 19:25:27 +00:00
odersky 869afdd850 Removed erroneous throw which was stealthily killing the build.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25614 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-09-06 11:11:00 +00:00
extempore 9cf65a8d6c Intersection types made specializable.
Formerly a specializable type parameter would be missed if in
an intersection.

  trait Trait[@specialized T] {
    def f[T](x: Foo[T] with Bar) = x
  }

Now that is specialized, as it already was in the "Foo[T]" case.
Closes SI-4794, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25613 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-09-06 02:48:52 +00:00
odersky 3d631fe87d more reflect changes
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25612 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-09-05 13:43:45 +00:00
odersky daaa644d6b More refinements to reflection and the reflective compiler.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25611 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-09-05 10:44:04 +00:00
Mirco 0a74d04a58 Moved test for scala-ide ticket-1000508 under /disabled/presentation/ directory, as the current test's result is wrong (the ticket is still opened). It will be moved back only once the ticket is closed. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25610 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-09-05 10:17:17 +00:00
Mirco 34a8976b89 Created test cases for tickets that need to be fixed in the presentation compiler. These tests should eventually be moved under folder /files/presentation/ once they are working.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25609 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-09-05 10:06:59 +00:00
extempore 784cdcbbf3 Offer warning when demonstrably non-side-effecting expressions appear in
statement position, which should be unintentional by definition. Threw
in removal of six places with useless discarded expressions which the
warning informed me about. No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25608 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-09-05 00:11:29 +00:00
extempore 3f4411279b Removed the type parameter from sliding, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25604 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-09-03 04:16:07 +00:00
Joshua.Suereth 6b81bdd2ba Docspree documentation for Stream from Derek Wyatt
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25603 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-09-02 19:38:37 +00:00
Joshua.Suereth db71c3c5b8 Some great AnyVal class hierarchy documentation from Iain McGinniss. No Review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25602 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-09-02 18:34:47 +00:00
heathermiller 6875b2eef2 Updated copyright notice in scaladoc. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25601 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-09-01 15:56:30 +00:00
extempore c8354bb691 Made it possible to supply a custom Global to the core scala runners.
The absence of "Global pluggability", combined with the fact that most
of the functionality in Global is unnecessarily rigid due to the phases
being implemented as objects, means that it has been close to impossible
to do interesting compiler development in a way which doesn't require
modifying the scalac source tree. This then leaves you continually
subject to punishment by code drift as the various places you were
forced to modify change out from under you.

This is somewhat less true now, thanks to new option:  -Yglobal-class

The primary wielders of Global (fsc/scala/scalac) now instantiate
the compiler via a (Settings, Reporter) => Global factory method in
the Global companion. If -Yglobal-class was given, that class (which
must have a (Settings, Reporter) constructor) will be instantiated if
possible, falling back on the standard one.  See

  test/files/pos/CustomGlobal.scala

for a working example. (It's not in run because I would have to be able
to give partest a different set of flags for successive compiles in the
same test.) Review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25600 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-09-01 02:31:55 +00:00
Joshua.Suereth 47d321c78e Document the usage and methods of scala.sys.process.
From the first international scaladoc marathon.

   Contributed by: Daniel Sobral

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25599 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-31 19:16:18 +00:00
odersky 0b2544fa4b Small tweak to reflection to make package types same as for SymbolLoaders
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25598 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-31 16:16:39 +00:00
dragos a613ac298a Better handling of presentation compiler shutdown. This fixes a source
of deadlocks: when the PC was asked to shutdown, all work items in the
work queue would be left pending, and no response would be set.

This commit attempts to clean up a bit better: a shutdown request 
clears the work queue and all pending loaded&typed or parsed-entered requests
by setting their responses to 'MissingResponse'. review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25596 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-31 10:09:26 +00:00
odersky 5e323a8969 More fixes to reflection and reflective compiler.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25589 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-30 21:04:51 +00:00
odersky a484db70b7 Twist to make crashes more robust :-) (by avoiding exceptions that get raised when printing debug output in erasure).
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25588 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-30 16:43:01 +00:00
odersky 3e8aa495b1 removing more debug output from reflection.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25587 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-30 16:42:15 +00:00
Joshua.Suereth a9b2192b6f Added extraneous test where classes are verified by loading them in non-boot classloaders one at a time. These are not wired into the standard workflow, but available optionally. Review by rytz
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25586 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-29 20:24:39 +00:00
heathermiller 149bcce332 Added copyright notice to all scaladoc pages. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25585 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-29 18:11:52 +00:00
odersky a418b2e60c Added package object support to reflection framework. Removed debug output and made some speed improvements.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25584 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-29 17:15:56 +00:00
odersky 92a40f1e57 More changes to get Reflect compiler working.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25583 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-29 12:45:19 +00:00
extempore 6043a4a7ed Gave partial function an empty member. Closes SI-4927, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25578 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-28 00:13:17 +00:00
extempore ae34b0a00c Another bit of stray debugging output involving good old symbol #431.
Oh, symbol #431, why must you haunt our dreams.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25577 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-27 18:02:32 +00:00
extempore 268cdc3942 Fixing up a few instances of suboptimal reversing, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25576 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-27 18:02:20 +00:00
extempore e82fd5e80e Replaced various now-unnecessary casts with straight getClass
calls.  Closes SI-4780, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25575 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-27 18:02:01 +00:00
extempore 1ca8734604 Fixed bug in Sorted "to" not using the ordering. Closes SI-4930, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25574 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-27 18:01:40 +00:00
odersky e77200a9a8 Fixing the build
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25573 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-26 20:24:45 +00:00
odersky a61c42caea Removing debug output that slipped into main compiler and broke the build.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25572 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-26 20:03:30 +00:00
odersky f7e4f28b23 More fixes/debug code for reflection.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25571 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-26 16:56:09 +00:00
grek e2d92fb8b9 Always include `liftcode` phase in a compiler run.
It turns out that `liftcode` phase must be always
executed or other phases will fail. Specifically,
at the moment `explicitouter` seems to depend on
`liftcode`. One can observe compiler crash by
compiling scala/Array.scala file without `liftcode`
included. At `explicitouter` phase compiler will
crash with assertion error saying it cannot
lift some code.

Review by odersky


git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25570 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-26 14:37:21 +00:00
extempore 3af67bab1c Some kind of scaladoc quoting fix from the sbt guy, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25569 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-25 20:58:19 +00:00
extempore 03397dd669 Recent icode checking tests were leaving a bit of a mess in the
filesystem.  Taught them to clean up after themselves.  I knew I'd
pick up a few useful tricks from my kids.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25568 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-25 20:55:00 +00:00
extempore 6a0290fa35 Made -Xprompt more useful, less crashy and more open to showing you
the stack trace without aborting.  For example, the following would
resume compilation after showing the trace.

  % scala -deprecation -Xprompt -nc -e 'case class Foo'
  foo.scala:1: warning: case classes without a parameter list have been deprecated;
  use either case objects or case classes with `()' as parameter list.
  case class Foo
               ^

  a)bort, s)tack, r)esume: s
  java.lang.Exception
    [...]
  	at scala.tools.nsc.ast.parser.Parsers$UnitParser.deprecationWarning(Parsers.scala:207)
  	at scala.tools.nsc.ast.parser.Parsers$Parser.paramClauses(Parsers.scala:2058)
  	at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$classDef$1.apply(Parsers.scala:2557)
  	at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$classDef$1.apply(Parsers.scala:2545)

No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25567 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-25 17:33:37 +00:00
odersky f87844aeb5 Fixes and temporary debug scaffolding for reflect code.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25566 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-25 17:17:54 +00:00
extempore 90c256f59c Sorting test output so it passes on java7, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25565 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-25 05:02:34 +00:00
extempore 99c8042d37 Renamed tests named bugXXX to tXXX, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25564 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-24 17:11:55 +00:00
odersky ef350c81e6 Fixed build problems
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25563 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-24 17:11:48 +00:00
odersky 59f3ce8902 Class that can be used for memoizing types in reified trees
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25562 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-24 17:06:04 +00:00
odersky 85b31691ce reflection refactoring so that we can now have a compiler that uses reflection instead of class files (ReflectGlobal/ReflectMain). Still needs some debugging to get it to run.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25561 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-24 17:04:34 +00:00
odersky 4e04e7412d Refactored everything that's clean in nsc.Main to nsc.Driver. Left the cruft in Main which now inherits Driver. Makes it simpler to create new compiler variants by subclassing Driver instead of adding yet one more case to the convoluted logic in Main.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25560 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-24 17:02:31 +00:00
extempore 00f8a5baf3 Removed and consolidated several redundant tests which had
filenames "bugXXX" and "tXXX" where XXX == XXX.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25559 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-24 16:49:38 +00:00
extempore a978f24ba3 Some 11th hour modifications with the dual purpose of a smooth
console life for sbt and so the repl can be used on google app engine.
Although this patch may look largish to be entering at RC4, there
isn't a lot going on.  It's trying to make these dangerous things:

 - property and environment variable accesses
 - thread creation
 - signal handler installation

happpen in a sufficiently uniform way that people who don't
want them and places who don't allow them are not left with an
unfixable situation where things blow up inside private methods.
Also, the (ahem) lower than usual elegance levels are due to it
being intended for 2.9.x as well.  Review by harrah.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25549 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-23 22:57:15 +00:00
extempore c8630fa0da Modified scala.reflect package object not to throw an exception
at initialization time if it can't instantiate the value in question.
Review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25546 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-23 21:15:20 +00:00
odersky 8f399614aa New reification code for symbols and types. Temporarily disabled reification-related tests.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25545 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-23 11:58:15 +00:00
rompf 1be75ee289 applying patch provided by Topher, fixes #3501. no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25544 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-23 11:14:53 +00:00
extempore 89f0f8aee2 Created infrastructure for testing icode + settings/partest yak shaving.
See enclosed test files/run/inline-ex-handlers.scala.  To
compare optimized and unoptimized icode after a given phase,
all you need in a partest source file is this:

    import scala.tools.partest.IcodeTest
    object Test extends IcodeTest {
      override def printIcodeAfterPhase = "inlineExceptionHandlers"
    }

Other things can be done, see IcodeTest.scala.  Review by ureche.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25541 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-22 19:49:46 +00:00
michelou 482069fc2b corrected misspelled type params (capitalized names 3x)
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25540 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-22 17:58:13 +00:00