Commit Graph

12741 Commits

Author SHA1 Message Date
odersky e7eea96e96 new tests. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22834 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-24 14:59:54 +00:00
odersky 0003edcb45 Fixes #3780. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22833 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-24 14:59:13 +00:00
plocinic 4679ddf39d Correctly locate context tree even on the edges. Fixed buggy definition of properlyPrecedes. Fix necessary for the eclipse plugin (ticket 1000124) as well as ENSIME. Review by milessabin.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22832 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-24 09:27:12 +00:00
magarcia bfb6fbb76d for MSIL:
(a) The bytecode that Scala.NET emitted had a tough time in passing peverify due to valuetypes (aka structs) and their related managed-pointer types. With these changes (details in [1] and [2]) external APIs exposing valuetypes can be used, yet the extra step of supporting defining valuetypes in Scala programs has been left for later. Supporting the unsigned integral valuetypes (used, among others, by IKVM) is also pending. 

(b) A very first step towards generics can be found in TypeParser.parseClass, for the time being commented out (search for the label "TODO CLR generics"). It's commented out because without CLRManifests codegen won't work as expected. Details in [3]. 

review by rytz

Refs:

[1] http://lamp.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/2010Q3/Bootstrapping3.pdf

[2] http://lamp.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/2010Q3/Bootstrapping4.pdf

[3] http://lamp.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/2010Q2/SigToType.pdf


git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22831 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-24 07:38:58 +00:00
extempore f9dad11629 Fix and test case for broken linked lists, contributed
by Lucien Pereira.  Closes #3361, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22830 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 16:57:10 +00:00
extempore 6ca71c2315 Pretty print tuples in the repl. Closes #3655, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22829 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 14:26:38 +00:00
dragos 38709ac48c New starr without debugging output. no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22828 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 13:30:40 +00:00
rytz 4a220abbb2 in refchecks, visit the qualifier of irrefutable filters. close #3773. review by moors.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22827 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 13:17:06 +00:00
rytz 9bd9472414 test for see #3769. no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22826 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 13:17:03 +00:00
rytz 58d2754e41 test for #3667. no review
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22825 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 13:17:00 +00:00
dragos c626d9b351 More robust icode loading and fixed an issue when dead-code eliminating closures that have live static fields.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22824 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:52:50 +00:00
dragos f3bf344919 New starr for optimized builds.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22823 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:52:43 +00:00
dragos 3b2442b1e2 Renaming and small tweak in testing.Benchmark for the output format.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22822 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:52:35 +00:00
dragos bed1d45453 Various fixes to optimizations, and mainly much better heuristics for inlining. Now even the compiler is some 3% faster! Yeah!
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22821 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:52:31 +00:00
dragos 67cac4c6c3 Fixed various issues with Icode, mainly fixing empty/open blocks.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22820 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:52:28 +00:00
dragos 526f8eac4b less logging.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22819 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:52:25 +00:00
dragos 596d4e160d Finally look at the right place for inherited methods that are effectively final.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22818 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:52:22 +00:00
dragos dce2213ed9 inline more in Range
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22817 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:52:19 +00:00
dragos 8ced6e5aa3 Improved the peephole optimizer to use liveness.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22816 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:52:16 +00:00
dragos b73f71edda Fix for not looking into Java types when specializing.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22815 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:52:12 +00:00
dragos 01bf029054 Small cleanups
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22814 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:52:09 +00:00
dragos 94447a11f7 Tweaks for better optimizations.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22813 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:52:06 +00:00
dragos d6ac5019e4 Made ranges a bit more friendly to the optimizer.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22812 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:52:03 +00:00
dragos aa024a9184 debugging output to track down wild boxing.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22811 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:52:00 +00:00
dragos db6dd390ac Added setup and teardown methods.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22810 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:51:57 +00:00
dragos 6c3ff6062f Specialize rhs of specialized fields.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22809 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:51:53 +00:00
dragos 2b67011b50 Don't box class parameters when passed to the super constructor, from specialized subclasses.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22808 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:51:50 +00:00
dragos 422a24831a Optimized away box(unbox(E)) ===> E.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22807 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:51:47 +00:00
dragos f7b7ad5894 Added an overridable setUp method that is called prior to each benchmarking (but whose execution time is not measured).
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22806 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-23 08:51:40 +00:00
moors 89965245bc forgot to update check file after renaming tests. no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22805 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-21 08:25:00 +00:00
moors 043759712c closes 2462. better implicit error messages.
@implicitNotFound(msg="Custom error message that may refer to type parameters ${T} and ${U}")
trait Constraint[T, U]

whenever an implicit argument of type Constraint[A, B] cannot be found, the custom error message will be used, where the type arguments are interpolated in the obvious way

note: if the msg in the annotation references non-existing type params, a warning is emitted

the patch also cleans up annotation argument retrieval (moved it to AnnotationInfo from Symbol)

review by odersky

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22804 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-20 14:48:12 +00:00
moors 03efb68c85 closes #3757. got paren wrong during refactoring.
no review

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22803 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-20 11:32:45 +00:00
moors 758e98159e closes #3575. stricter override checking for java members with default access: can only override such a member from the same package
cloneSymbol now preserves privateWithin -- need to reset it explicitly now when before it was assumed to be not to be carried over

rewrote accessibility in overriding checks so they're more readable, but hopefully with same semantics

review by odersky

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22802 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-20 10:01:09 +00:00
extempore e0008884fa Discovered ListMap.++ returns a Map instead of a ListMap. Does
preserving binary compatibility mean we can't fix this sort of thing?
Fixing for now, inquiring via: review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22801 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-19 16:04:23 +00:00
moix c14c7dc3a1 Extending sbt capabilities :
- building continuation plugin
- building and replacing fjgb, msil and forkjoin
- building and replacing starr
- layer cleaning tasks

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22800 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-19 15:06:34 +00:00
dubochet ed61305540 Fixed build for Java 1.5. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22799 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-19 14:28:46 +00:00
dubochet 0cbe6f6d14 [scaladoc] Merges Petr's change to Scaladoc from the Colladoc branch: bugfixes, improvements and refactorings that make it possible to extends Scaladoc into Colladoc.
- Layout of index uses jQuery UI panel instead of frameset.
 - Search boxes have correct width on Firefox.
 - Scaladoc models the original, untransformed source.
 - Various internal bugfixes & refactorings.
Review by dubochet.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22798 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-19 14:04:09 +00:00
moors 5886d95b3a closes #2788. flatten now works for arrays of traversables, not just arrays of arrays
the added flexibility'll cost ya one ClassManifest

review by phaller

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22797 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-19 12:26:25 +00:00
moors f8a1cfcf67 closes #3777. type constructor inference now tries harder to unify a type constructor variable (that's applied to type arguments) with a type alias by dealiasing it, hoping to discover a concrete type constructor (that's applied to type arguments).
no review

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22796 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-19 12:20:28 +00:00
odersky dcf07f2fd4 Closes #3763. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22792 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-18 17:47:04 +00:00
odersky c005227dff Closes #3756. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22791 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-18 17:12:44 +00:00
rytz 930dc34e61 better fix for see #3667. not all objects are serializable, only companions of case classes or other serializable classes. review by polcinic.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22786 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-17 17:15:08 +00:00
rytz e7d601ad9c use arraycopy not Array.copy in Arraybuffer.sizeHint. close #3766, #3767. no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22785 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-17 14:43:22 +00:00
rytz 85e0d7b643 Revert ArrayBuffer's sizeHint as I had a typo anyway and it needs more thinking. see #3766, see #3767.
This reverts commit bf87118d701df2313a9f680e327ce066765c10d3.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22780 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-16 18:40:54 +00:00
rytz 8ddf61ce60 use arraycopy instead of Array.copy in ArrayBuffer's sizeHint. close #3766, review by extempore.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22779 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-16 17:35:07 +00:00
rytz ec17cc0ba4 cosmetic fix to GenMSIL. no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22778 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-16 17:29:45 +00:00
rytz fd73ec29c8 remove space from sbt's build/x/ classes directory. no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22777 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-16 17:29:42 +00:00
rytz 7a5cdf2669 documentation for scala.Array. thanks for the patches! close #3751, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22776 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-16 17:29:40 +00:00
rytz a1cb3b63c6 doc comment for scala package. (did not add comment on currentThread because of see #3762). close #3750, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22775 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-16 17:29:36 +00:00
extempore 6c1815706f Since r22186 scripts wait for all non-daemon threads to exit
before the script will exit (not doing so was the cause of several
other bugs involving early script termination) but this means we
must be careful not to introduce unnecessary non-daemon threads
in the script infrastructure.  Two such sources (now fixed) were
the shutdown hook which deletes temporary files and the stream
consumers used by Process.  Closes #3678, review by harrah.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22767 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-08-15 15:45:02 +00:00