Commit Graph

14492 Commits

Author SHA1 Message Date
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
extempore 7c625135ca Some cleanups in inline exception handlers. Review by ureche.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25539 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-22 15:18:50 +00:00
extempore 6d31a5bd62 Bug in optimizer eliminated potentially exceptional not-dead code.
Streamlined isSideEffecting logic.  Review by ureche.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25538 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-21 16:05:06 +00:00
extempore 970bf06b85 Set the partest encoding to UTF-8. Review by heathermiller.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25537 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-21 13:46:08 +00:00
heathermiller f91f471533 Improved documentation for scala.collection.immutable.List and scala.collection.immutable.Queue. Contributed by Matthew Pocock during the Monthly Docspree. Review by phaller.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25535 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-21 00:29:10 +00:00
extempore 93d7c3be9b Maybe that last commit was closer than I thought. Don't let
0-arg getClass reach bytecode.  References SI-4931, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25534 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-21 00:26:54 +00:00
extempore 1c824a3fe8 Reverts previous commit. Guess I won't get to skate this one in
a hurry, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25533 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-20 23:37:09 +00:00
extempore d0be5ef5b8 Kludge: don't let getClass make it into bytecode.
References SI-4931, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25531 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-20 23:26:34 +00:00
heathermiller 9df857c88a Improves documentation of scala.Predef. Contributed by Iain McGinniss during the Aug 20 Docspree. Review by phaller.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25530 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-20 19:52:30 +00:00
kzys 51805d5782 Replaced Application with App in ScalaDoc. Contributed by Simon Ochsenreither. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25529 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-20 19:41:47 +00:00
kzys 4d6bb7beb9 Shows modifiers before kinds. Fixes #4451. Contributed by Shows modifiers before kinds. Fixes #4451. Review by heathermiller.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25528 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-20 19:38:57 +00:00
extempore f104d80085 Moved files to welcome our ant overlords, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25527 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-20 15:14:01 +00:00
ureche 7cfdad5457 [recommit] Backend optimization: Inline exception handlers. Review by dragos.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25526 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-19 21:23:21 +00:00
odersky 2c1b532255 Literals now take Any as argument (used to represent free values in reified trees).
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25525 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-19 16:27:24 +00:00
michelou 7fde6554b9 fixed svn props and presentation check files
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25524 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-19 16:27:22 +00:00
odersky c6a4a7a72b New utilitly method to create scope with some elements.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25523 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-19 16:25:32 +00:00
Mirco ffa3d7d3a6 removed empty presentation compiler's test folders, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25522 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-17 13:48:18 +00:00
Mirco fe6dfc2ba3 Major rewrite of the testing infrastructure for the presentation compiler. Added several new tests that will be part of the nightly build. Once the move to SBT is completed I will look into how to extract the test infrastructure (as it should really not be living in the compiler codebase). Review by dragos
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25521 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-17 13:32:25 +00:00
Mirco 30ff03ba40 Added --presentation flag in the help message
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25520 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-17 12:56:14 +00:00
extempore f76f1467de Looks like I broke -nobootcp at some point. Fixed it, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25519 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-16 16:53:29 +00:00
extempore e7e4acea09 Improved the error message given when a concrete method implementation
doesn't match the abstract one.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25518 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-16 16:53:16 +00:00
extempore 34fa938a38 Removing the code which has been deprecated since 2.8.0. Contributed by
Simon Ochsenreither, although deleting code is such fun one hesitates to
call it a contribution. Still, we will. Closes SI-4860, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25511 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-15 20:48:25 +00:00
extempore be61acff42 Fixed a method which got hosed in the reflection refactor
because the meaning of "this" changed.  This is a perfect
opportunity to yell "What is the meaning of this!" No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25510 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-15 20:46:47 +00:00
extempore dc67fbc9ae A conceivably pretty bad performance bug in builders.
SI-4821 pointed out that ArrayBuffer's ++ checks for a cheap size
method by matching on IndexedSeq, but mutable.IndexedSeq, so all
immutable collections are thrown in the same group as linear seqs.
I went looking for other examples of this and found them, in
key classes like Builder.

The "type shadowing trap" is a serious issue in the collections.
Closes SI-4821, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25509 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-15 20:46:35 +00:00
phaller a4c1a37ce7 Reverted r25440 (update of forkjoin library) until all build problems are resolved. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25507 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-15 18:05:50 +00:00
odersky 3e1f5e6981 Split up adapt in some smaller methods; added code lifting for non-function types to it.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25505 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-15 17:24:47 +00:00
odersky cf62ea6e67 Added debug output to track down Fregor's "failing to lift" problem.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25500 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-15 14:51:59 +00:00
odersky bba2c81332 Linked Manifests up with Reflection. Manifests now contain a `tpe` field which gives access to the underlying reflection Type.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25499 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-08-15 12:00:44 +00:00