summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Tackling long standing issues with startup.Paul Phillips2010-12-075-65/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | anyone can offer any reason why it's not (long past) time to do this I can back the truck up. (But I will have a list of bourne shell scripts for you to write.) With this commit: 1) -J options are now passed to the underlying JVM, along with -D options which already were. scala -Dfoo=bar and scala -J-Dfoo=bar are identical (but -J can pass arbitrary arguments to the jvm: -J-verbose, -J-Xmx4G, etc.) 2) Eliminated DefinesSetting. It was ill-conceived because setting system properties must be done at JVM start to guarantee they will be seen where appropriate: by the time scala is involved it's too late. The starter script takes care of routing -D to the jvm, and no longer sends them along to scala as well. Since we have a new system package you can read any property in system.props, like this: % scala -Dp1="hi" -Dp2="bye" -e 'println(system.props filterKeys (_.length == 2))' Map(p2 -> bye, p1 -> hi) 3) After measuring that startup is a full second faster by putting the scala jars on the bootclasspath, I gave us a standard way to take advantage of this. It's not done by default, although we should seriously consider it (I'm familiar with the issues that have arisen in the past.) Reclaim your life, one startup second at a time. The flag is --usebootcp, as below: // Here's a way (in bash 4) to compare repl startup times each way while true ; do time pscala -i <(echo "system exit 0") ; done |& grep real while true ; do time pscala --usebootcp -i <(echo "system exit 0") ; done |& grep real Once again I find myself unable to nominate any plausible reviewer (if there were anyone interested in this stuff, they'd be doing it instead of me) so no review.
* Hardened sigint handler against ctrl-C in the f...Paul Phillips2010-12-071-1/+3
| | | | | | Hardened sigint handler against ctrl-C in the first few seconds of startup. No review.
* Tired of trying to debug things like classpaths...Paul Phillips2010-12-075-21/+36
| | | | | | | | | | | | Tired of trying to debug things like classpaths only to see output like the following: [search path for class files: /System/classes/you/already/know:/Importan...] I added a "do not truncate" mechanism to reporter and put it to use. Now scala -verbose will let you in on those classpath secrets. No review.
* Don't transform patterns during superaccessors:...Paul Phillips2010-12-063-0/+22
| | | | | | Don't transform patterns during superaccessors: the matcher can't deal with funny trees. Closes #4062, review by dragos.
* The ability to interrupt repl execution without...Paul Phillips2010-12-065-38/+170
| | | | | | | | | | | The ability to interrupt repl execution without terminating the JVM has snowballed a bit, but it's so handy that it's worth it. This commit further encapsulates individual lines of execution such that they can be managed after the signal comes in, and if necessary, forcibly terminated. I'm straying into territory where I could use a really Thread-knowledgeable reviewer: any volunteers? In the meantime, no review.
* Moved ClassfileAnnotation/StaticAnnotation/Anno...Paul Phillips2010-12-0645-78/+73
| | | | | | | Moved ClassfileAnnotation/StaticAnnotation/Annotation/TypeConstraint into scala.annotation and enabled the deprecated type aliases in scala.* to point there. Also enclosed is a new starr to bootstrap. No review.
* Burned by a last minute text change.Paul Phillips2010-12-051-1/+1
|
* Cleaned up and brought up to date the help text...Paul Phillips2010-12-0514-158/+218
| | | | | | | | Cleaned up and brought up to date the help text for -X and -Y options. Made some enhancements to PhasesSetting, which are documented if you run scalac -X or -Y. (Try it!) Disabled some dead settings and renamed others to reflect their current purpose. No review.
* Mopping up after the deprecation of exit and er...Paul Phillips2010-12-0599-346/+336
| | | | | | | | | | | | | | Mopping up after the deprecation of exit and error. It is decidedly non-trivial (at least for the IDE-impaired) to be completely sure of which error function was being called when there were about twenty with the same signature in trunk and they are being variously inherited, imported, shadowed, etc. So although I was careful, the possibility exists that something is now calling a different "error" function than before. Caveat programmer. (And let's all make it our policy not to name anything "error" or "exit" from here on out....) No review.
* Remedied a return type oops in the system package.Paul Phillips2010-12-043-6/+5
| | | | | | Deprecated the rest of the elements with comments saying "deprecate me." No review.
* Introducing scala.system, the product of a whir...Paul Phillips2010-12-0412-44/+179
| | | | | | | | | | Introducing scala.system, the product of a whirlwind couple of hours. More useful stuff than you can shake three sticks at. See the scala.system package object. It's even documented. And since it has methods error and exit, proceeded to deprecate the ones in Predef. No review.
* A foot in the door with Parsers/JavaParsers and...Paul Phillips2010-12-049-100/+125
| | | | | | | | | A foot in the door with Parsers/JavaParsers and Scanners/JavaScanners. Recently clued in as to how this situation came to be, I now know there's no reason not to start containing the damage. Also more work on names: made a general method for transforming Trees into type-named Trees and put it to work. No review.
* Some refactoring of genjvm trying to separate o...Paul Phillips2010-12-043-195/+218
| | | | | | | Some refactoring of genjvm trying to separate out some of the relatively immutable logic from the parts more in flux, and slightly ease the process of keeping separable things separate. Review by dragos.
* Segregated all the android related code in a ne...Paul Phillips2010-12-043-39/+62
| | | | | | Segregated all the android related code in a new file and integrated it with genjvm. Review by michelou.
* Fixes an inconsistency in primitive hashcode ca...Paul Phillips2010-12-041-1/+3
| | | | | | | | Fixes an inconsistency in primitive hashcode calculation. I did have a test trying to spot exactly this situation, which says something about either me or about testing or about me and testing. Closes #3957, no review.
* A selection of collections additions from the l...Paul Phillips2010-12-0410-76/+156
| | | | | | | | | | | | | | | | | | | | | | | | A selection of collections additions from the lower end of the controversy scale. // TraversableOnce def collectFirst[B](pf: PartialFunction[A, B]): Option[B] def maxBy[B](f: A => B)(implicit cmp: Ordering[B]): A def minBy[B](f: A => B)(implicit cmp: Ordering[B]): A // Iterator def span(p: A => Boolean): (Iterator[A], Iterator[A]) // Traversable def inits: Iterator[Repr] def tails: Iterator[Repr] def unzip3[A1, A2, A3](implicit asTriple: A => (A1, A2, A3)): (CC[A1], CC[A2], CC[A3]) // Sequences def permutations: Iterator[Repr] Review by odersky.
* Starting the mopping up now that names have som...Paul Phillips2010-12-0312-164/+166
| | | | | | | | | | | | | | Starting the mopping up now that names have some more sense of their place in the universe. Cleaned up some heavy multi-boolean logic. Added more documentation on the relationships between entities in Symbols and some other compiler things which often blur together. Fun fact: the incorrect usage of nme.ScalaObject in Contexts which I reported when first broaching the namespace subject became a compile time error during the writing of this patch, because there is no longer any such thing as nme.ScalaObject. It's a little bit like magic. No review.
* close #4036, fix #2489.Lukas Rytz2010-12-033-5/+34
|
* close #3951. review by dubochet.Lukas Rytz2010-12-034-3/+52
|
* close #3946.Lukas Rytz2010-12-037-3/+27
|
* Added test for #4052Hubert Plociniczak2010-12-031-0/+5
|
* Revert one-liner. No review.Eugene Vigdorchik2010-12-031-1/+1
|
* Recovered ++: from the dustbin and dropped it o...Paul Phillips2010-12-032-25/+32
| | | | | | | | Recovered ++: from the dustbin and dropped it on Traversable. Removed a very unfortunate deprecated method from BufferLike which it was not authorized to deprecate because it's a Seq. Closes #3471, review by prokopec.
* Some html stripping in explicitouter because I ...Paul Phillips2010-12-031-30/+37
| | | | | | Some html stripping in explicitouter because I stubbed my toe on some angle brackets. No review.
* Eliminated SYNTHETICMETH flag.Paul Phillips2010-12-0311-104/+129
| | | | | | | meaningful name inside the pattern matcher. Created a tracker for TRANS_FLAG which could enforce the transience it promises us, but didn't turn it on. No review.
* Parameterizes TraversableFactory.range so it ca...Paul Phillips2010-12-034-19/+19
| | | | | | Parameterizes TraversableFactory.range so it can be used with any integral type. Closes #3542, no review.
* immutable.Map keySet returns immutable.Set.Paul Phillips2010-12-035-6/+10
|
* Overrides immutable.{ Map, Set, Seq } to return...Paul Phillips2010-12-034-0/+15
| | | | | | | Overrides immutable.{ Map, Set, Seq } to return self on the corresponding toMap/toSet/toSeq. Closes #3953, review by prokopec.
* Generalizes catch blocks to include any Partial...Paul Phillips2010-12-036-14/+86
| | | | | | | | | | | | | | | | | | | Generalizes catch blocks to include any PartialFunction[Throwable, T]. Existing catch blocks will compile exactly as before. Anything else (which mean: the token after CATCH is not a left brace, or it is a left brace not immediately followed by CASE) is desugared as follows: try body catch expr // becomes try body catch { case x => val catchFn = expr if (catchFn isDefinedAt x) catchFn(x) else throw x } Review by odersky.
* Added missing file for delayed initMartin Odersky2010-12-021-0/+12
|
* Restore id adapt for phases after refChecked (a...Eugene Vigdorchik2010-12-021-1/+1
| | | | | | Restore id adapt for phases after refChecked (and fix Eclipse builder as a side effect). Try to fix sbt build. No review.
* It's a big one!Paul Phillips2010-12-0250-951/+1063
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TermName and TypeName are exposed throughout the compiler based on what kind of name a given abstraction ought to have. (There remain places where one needs to create a name without knowing yet what it will be, and those will always be Names.) The nme object in the compiler now holds only term names. To reference a known type name, use tpnme: nme.List == ("List": TermName) tpnme.List == ("List": TypeName) The contents of nme and tpname are defined in traits, many of which are shared, so if a name should exist only as a Type and not a Term, it should be defined in CompilerTypeNames, but otherwise in CompilerTermNames or CompilerCommonNames. This is partially complete but I'm sure there are still many shared which should pick a side. Usage of .toTermName and .toTypeName is strongly discouraged. After the dust has settled, there will be very few places where it will make sense to hop between namespaces like that. There are some implicits to smooth everything out, most of which should be removable eventually. // these two are in no hurry to go anywhere String => TermName String => TypeName // but not String => Name: def view in the compiler is no longer implicit // these two are temporary, and can log when they kick off to help us flush // out remaining issues of "name migration" Name => TermName Name => TypeName There is more work to be done before we're properly protected from naming errors, but I will not allow another eight hour tragedy to befall lukas or anyone else! Review by rytz. (Formality.)
* added -jar option to scala interpretermichelou2010-12-023-15/+64
|
* minor update (detach examples)michelou2010-12-023-7/+12
|
* In r23627 Lukas fixed specialization bug that s...Hubert Plociniczak2010-12-021-1/+1
| | | | | | | | In r23627 Lukas fixed specialization bug that seemed to be the reason for #3993 and other specialization and resident compiler bugs. So reverting quick fix r23576 as it is not necessary anymore. No review. Closes #3993.
* fixed typoMartin Odersky2010-12-021-1/+1
|
* Reverted delayed init because of two failing testsMartin Odersky2010-12-021-87/+5
|
* delayed init now supportedMartin Odersky2010-12-026-6/+130
|
* Some cruft which finally got on my nerves enoug...Paul Phillips2010-12-012-47/+38
| | | | | | | | Some cruft which finally got on my nerves enough to decruft. No more getClass2 and getModule2 uses in Definitions, since that transition was completed in the time of my grandpappy. (The implementations remain, quiescent.) No review.
* A patch authored by martin to fix one of the bi...Paul Phillips2010-12-017-751/+7
| | | | | | | | | | | | | A patch authored by martin to fix one of the big outstanding issues with -Ycheck. The typer had a vision of the world which fell to pieces if presented with a tree from after phase constructors. Now it is wiser: perhaps a bit sadder as well, but every typer must face this day sooner or later. Also removed the various passing tests from test/checker-tests, but still plenty of fascinating failures in there for anyone interested in helping push to the finish line! No review.
* More fiddling with checkSensible.Paul Phillips2010-12-016-33/+51
| | | | | | | | | | warnings. Fixed some bugs revealed by said warnings, and made some minor changes to avoid warnings. (Technically it's not a bug to have unrelated classes compare as equal, but it so often is a bug that it behooves us not to do it intentionally so the warnings stand out.) Disabled the most useful warning for the moment since it'd be wrong with some frequency. No review.
* Bug in ListMap. Closes #4046, no review.Paul Phillips2010-12-011-1/+1
|
* Disabled test after failing to read linux's mind.Paul Phillips2010-12-012-0/+0
|
* Taking retronym's advice on increasing Universa...Paul Phillips2010-12-011-2/+4
| | | | | | Taking retronym's advice on increasing UniversalFn transparency. No review.
* Some collections overrides for more efficient t...Paul Phillips2010-12-014-7/+25
| | | | | | Some collections overrides for more efficient toSeq and toBuffer where possible. Closes #2972, review by malayeri.
* Attempt to fix failing test. No review.Paul Phillips2010-11-301-3/+4
|
* Parser relaxation so that one can name the type...Paul Phillips2010-11-303-15/+24
| | | | | | | Parser relaxation so that one can name the type variables in a constructor pattern match: this is a prerequisite to realizing the full potential of gadts. (Nothing new works here however.) No review.
* Found several minor thigns wrong with checkSens...Paul Phillips2010-11-305-45/+80
| | | | | | | Found several minor thigns wrong with checkSensible, which tries to issue warnings for comparisons which will always be true or false. No review.
* Deprecated the @serializable annotation, introd...Lukas Rytz2010-11-3083-248/+258
| | | | | | | | | | | | | | | | | | | Deprecated the @serializable annotation, introduce a new trait "scala.Serializable" which has to be extended instead (cross-platform). Known issues: - Companion objects of serializable classes (including case classes) are automatically made serializable. However, they don't extend "Serializable" statically because of the known difficulty (should be done before typing, but hard). - Writing "case class C() extends Serializable" gives "error: trait Serializable is inherited twice" - Functions are serializable, but don't extend Serializable dynamically (could be fixed by making FunctionN Serializable - shouldn't we?) Note that @SerialVersionUID continues to be an annotation; it generates a static field, which is not possible otherwise in scala. Review by dragos, extempore. Question to dragos: in JavaPlatform.isMaybeBoxed, why is there a test for "JavaSerializableClass"? Is that correct?
* It looks like the fix for #2318 was causing pro...Paul Phillips2010-11-305-4/+53
| | | | | | | It looks like the fix for #2318 was causing problems, so I gave it some more graceful failure. Leaving #2318 open because the implementation could still work harder to find the right method. No review.