summaryrefslogtreecommitdiff
path: root/src/scalap
Commit message (Collapse)AuthorAgeFilesLines
...
* More consistent use of Names.Paul Phillips2012-01-054-109/+13
| | | | | | | | Several large helpings of tedium later, fewer strings are being discarded like so much refuse. Some names now cache a String, but only "named Names", so it's not very many and they pay for themselves pretty quickly. Many fewer name-related implicit conversions now taking place. A number of efficiency related measures.
* Low-level optimization.Paul Phillips2011-12-302-3/+6
| | | | Eliminated a bunch of unnecessary array expense.
* ScalaClassLoader changes.Paul Phillips2011-11-031-5/+5
| | | | | Lots of fiddling in the interests of a better classloading future.
* Tired of ugly-printing in the repl, I sort of f...Paul Phillips2011-08-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Tired of ugly-printing in the repl, I sort of finished some old code for pretty printing token streams. It is at least a lot prettier than it once was, and I threw in some power mode helpers. Now you can do this. % scala -Dscala.repl.power Welcome to Scala version 2.10.0.r25427-b20110801144412 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_26). // .u turns a string into an URL like .r does into a regex, and .pp pretty prints the url scala> "https://raw.github.com/scalaz/scalaz/master/example/src/main/scala/scal az/example/ExampleIteratee.scala".u.pp package scalaz.example object ExampleIteratee { def main (args: Array[String]) = run import scalaz._ import Scalaz._ import IterV._ [etc it's all there in real life] } No review.
* Following up on things that -Xlint told me, som...Paul Phillips2011-07-291-1/+1
| | | | | | | | | | | | | | | Following up on things that -Xlint told me, sometimes because Mr. Linty was being sensible and other times just to shut him up so we can hear better in the future. - made xml.Equality public because it occurs in public method signatures - made some actor classes with inaccessible-unoverridable methods final - eliminated a bunch of "dead code follows" warnings by deleting the dead code which really did follow - improved the reliability of warnings about inaccessible types For the changes in actors, review by phaller.
* Changes to reflection.Martin Odersky2011-07-162-2/+2
|
* Adding some Sets/Maps to perRunCaches, and elim...Paul Phillips2011-07-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* ByteCodecs move to reflect.internal.Martin Odersky2011-07-082-2/+2
|
* Fixes #4490 and #4467.Kato Kazuyoshi2011-06-181-1/+1
|
* Takes 30+% off the startup time for scala/scala...Paul Phillips2011-05-081-6/+7
| | | | | | | | | | | | | | | | | Takes 30+% off the startup time for scala/scalac with a variety of optimizations pinpointed by tracing method invocations. Frequent guest stars in the parade of slowness were: using Lists and ListBuffers when any amount of random access is needed, using Strings as if one shouldn't have to supply 80 characters of .substring noise to drop a character here and there, imagining that code can be reused in any way shape or form without a savage slowness burn being unleashed upon you and everything you have ever loved, String.format, methods which return tuples, and any method written with appealing scala features which turns out to be called a few orders of magnitude more often than the author probably supposed. This may be only the tip of the iceberg. No review.
* I wrote a warning when nullary methods return U...Paul Phillips2011-04-284-5/+5
| | | | | | | | | | | | | | | I wrote a warning when nullary methods return Unit. I wimped out of including it in this patch because we had about 200 of them, and that's what is fixed in this patch. I will add the warning to some kind of "-Xlint" feature after 2.9. This is motivated at least partly by the resolution of #4506, which indicates the distinction between "def foo()" and "def foo" will continue to jab its pointy stick into our eyes, so I believe we have a minimal duty of at least following our own advice about what they mean and not making a semirandom choice as to whether a method has parens or not. Review by community.
* Found there was still all kinds of detritus rem...Paul Phillips2011-04-113-9/+9
| | | | | | | | Found there was still all kinds of detritus remaining from the deceased IMPLICITMETHODtpe and ImplicitMethodType. Applied wrecking ball, review by moors. (Can I do the same thing with DEBRUIJNINDEXtpe and DeBruijnIndex?)
* Deleted SourcelessComments.Paul Phillips2011-04-071-28/+2
| | | | | | | | | | | | | Nothing and Null with improved documentation of their particulars and convinced scaladoc to parse them without leaving scalac institutionalized. Now rather than seeing our hardcoded documentation strings bitrot in a shadowy flight from classes which do not exist, we are championing the cause of the innocent and powerless. Nothing and Null aren't above the law! So now any responsible party can fire up their text editor and go to town on Nothing.scala. As I'm sure they will. Review by malayeri.
* Some minor sensibility improvements to previous...Paul Phillips2011-03-311-137/+66
| | | | | | Some minor sensibility improvements to previous patch, and tearing out some obsolete pieces of scalap. No review.
* Polishing the programmatic interface to the rep...Paul Phillips2011-03-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Polishing the programmatic interface to the repl and other bits of machinery which we'll have to live with for a while. The repl classloader now works more like you'd expect a classloader to, as seen here: % scala -Dscala.repl.power scala> class Bippus extends Traversable[Int] { def foreach[U](f: Int => U) = () } defined class Bippus scala> intp.classLoader.getResourceAsStream("Bippus").bytes() res0: Array[Byte] = Array(-54, -2, -70, ... scala> res0.size res1: Int = 23954 scala> case class Bippy(x: Int) defined class Bippy // classBytes is shorter way to say the same thing scala> intp.classLoader.classBytes("Bippy").size res2: Int = 2356 scala> intp.classLoader.classBytes("Bippy$").size res3: Int = 1741 Closes #4399, no review.
* Rename io.Code.toUTF8 and io.Code.fromUTF8 so t...Donna Malayeri2011-03-073-5/+5
| | | | | | | Rename io.Code.toUTF8 and io.Code.fromUTF8 so that the names match what the methods do, with an added migration warning. Closes #4203. No review.
* brought scalap up to date with minimal patch.Adriaan Moors2011-01-263-1/+5
|
* Updated copyright notices to 2011Antonio Cunei2011-01-2014-14/+14
|
* Imported sbt.Process into trunk, in the guise o...Paul Phillips2011-01-121-2/+2
| | | | | | | | | | | | | | | | | | | Imported sbt.Process into trunk, in the guise of package scala.sys.process. It is largely indistinguishable from the version in sbt, at least from the outside. Also, I renamed package system to sys. I wanted to do that from the beginning and the desire has only grown since then. Sometimes a short identifier is just critical to usability: with a function like error("") called from hundreds of places, the difference between system.error and sys.error is too big. sys.error and sys.exit have good vibes (at least as good as the vibes can be for functions which error and exit.) Note: this is just the first cut. I need to check this in to finish fixing partest. I will be going over it with a comb and writing documentation which will leave you enchanted, as well as removing other bits which are now redundant or inferior. No review.
* I'm wandering around trunk looking for slowness.Paul Phillips2010-12-201-66/+30
| | | | | | | | | | | | | | | | | are constant distractions which I've meant forever to fix anyway, such as the importing of collection.mutable._ (or any other package with lots of reused names.) Why is this relevant to performance? Well, var x = new HashSet[Int] What's that? What does 'x += 1' mean? These are questions we can all live without. There's almost nothing left which references HashSet or HashMap or Stack or other ambiguous classes without a qualifier: I can finish trunk but I can't keep it clean on my own. (Where should I be writing this stuff down, I wonder.) No review.
* Mopping up after the deprecation of exit and er...Paul Phillips2010-12-052-7/+7
| | | | | | | | | | | | | | 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.
* Eliminated SYNTHETICMETH flag.Paul Phillips2010-12-031-1/+0
| | | | | | | 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.
* It's a big one!Paul Phillips2010-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.)
* Changed the behavior of -cp for scalap.Iulian Dragos2010-09-031-4/+10
|
* Generalized the scala sig "look in both attribu...Paul Phillips2010-08-032-36/+37
| | | | | | | Generalized the scala sig "look in both attribute and annotation" code so it can be reused outside of scalap main. Closes #3717, review by ilyas.
* Removed a few instances of redundant or dead co...Paul Phillips2010-05-241-15/+0
| | | | | | | Removed a few instances of redundant or dead code, most of which was marked as waiting for a new starr which has long since arrived. No review.
* It's clearly not a long term solution to go hun...Paul Phillips2010-05-221-1/+1
| | | | | | | | It's clearly not a long term solution to go hunting them one by one, but for the short term goal of shipping 2.8.0 without accidental java 6 dependencies, removed what should be all uses of String.isEmpty from the source. No review.
* Removed more than 3400 svn '$Id' keywords and r...Antonio Cunei2010-05-1212-12/+0
| | | | | Removed more than 3400 svn '$Id' keywords and related junk.
* scalap: signature for case classes fixedilyas2010-04-282-0/+5
|
* Since pickled data moved into annotations ShowP...Paul Phillips2010-04-211-2/+25
| | | | | | | | | Since pickled data moved into annotations ShowPickled has been confusedly scratching its head. Made tools/showPickled work again. In the process created a simple interface for creating command line tools for the (majority of) commands which would just like to specify a handful of options. No review.
* ScalaSigPrinter fixed for multiline string valu...ilyas2010-04-111-0/+5
| | | | | ScalaSigPrinter fixed for multiline string values in annotations
* Some tweaks to classpath handling I had left ov...Paul Phillips2010-04-061-0/+1
| | | | | | Some tweaks to classpath handling I had left over from trying to figure out the continuations plugin issue. No review.
* As a brief diversion from real work, implemente...Paul Phillips2010-04-063-5/+5
| | | | | | | | | As a brief diversion from real work, implemented Damerau–Levenshtein and ran it on trunk to elicit obvious misspellings. Unfortunately they're mostly in places like compiler comments which real people never see, but I fixed them anyway. All those English Lit majors who peruse our sources are sure to be pleased. No review.
* Rearranging IndexedSeq/LinearSeq and related workMartin Odersky2010-04-051-1/+1
|
* Fix to the way Scalap decodes ScalaSignature an...Gilles Dubochet2010-03-293-8/+23
| | | | | | Fix to the way Scalap decodes ScalaSignature annotations. Contributed by ilyas. Already reviewed by dubochet, no review.
* some output polishingilyas2010-03-261-3/+7
|
* missing quotes for annotation values addedilyas2010-03-261-2/+2
|
* Renamed partialMap to collect.Paul Phillips2010-03-241-2/+2
| | | | | | | | | method on Iterator called collect which I had to remove, because if the method is overloaded it puts a bullet in the type inference, an intolerable result for a function which takes a partial function as its argument. I don't think there's much chance of confusion, but I put a migration warning on collect just in case. No review.
* Scala signature is generated as an annotation (...Gilles Dubochet2010-03-233-10/+62
| | | | | | | | | | | | | Scala signature is generated as an annotation (that is accessible through Java reflection). - compiler generates all pickled Scala signatures as annotations to class files. - compiler can read class files with signature as annotations or old-style signatures as attributes. - Scalap has also been updated to new signatures (contributed by Ilya Sergey: thanks a lot). - FJBG updated to allow entering constant pool strings as byte arrays. - ByteCodecs decode method returns the length of the decoded array. Review by ilyas. Already mostly reviewed by odersky.
* Some support code related to partest changes.Paul Phillips2010-03-212-9/+11
|
* Fixed build problem by eliminiating a redundant...Martin Odersky2010-03-161-1/+1
| | | | | | Fixed build problem by eliminiating a redundant implicit in scalap. Review by extempore.
* Leveraged -Xmigration to burn off some warts wh...Paul Phillips2010-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Leveraged -Xmigration to burn off some warts which arose in the new collections. Warnings put in place for behavioral changes, allowing the following. 1) Buffers: create new collections on ++ and -- like all the other collections. 2) Maps: eliminated never-shipped redundant method valuesIterable and supplied these return types: def keys: Iterable[A] def keysIterator: Iterator[A] def values: Iterable[B] def valuesIterator: Iterator[B] def keySet: Set[A] I concluded that keys should return Iterable because keySet also exists on Map, and is not solely in the province of Maps even if we wanted to change it: it's defined on Sorted and also appears in some Sets. So it seems sensible to have keySet return a Set and keys return the more general type. Closes #3089, #3145. Review by odersky.
* #3128 fixedilyas2010-03-021-4/+19
|
* trailing spaces in decompiled annotations are t...ilyas2010-03-011-3/+5
| | | | | trailing spaces in decompiled annotations are trimmed
* scalap tests fixedilyas2010-03-011-2/+2
|
* #2885 fixedilyas2010-03-011-0/+1
|
* #3060 fixedilyas2010-03-012-80/+106
|
* Minor printer fix for singleton typesilyas2010-03-011-4/+5
|
* More return type annotation to work around my o...Paul Phillips2010-02-252-6/+6
| | | | | | More return type annotation to work around my other frequent guest in the world of #3082-connected pickler bugs. No review.
* Some much needed housecleaning regarding system...Paul Phillips2010-02-231-1/+0
| | | | | | | | | Some much needed housecleaning regarding system properties. If you can possibly resist the temptation, it'd be great if people could try to go through the properties classes to get and set them, and also to set property values somewhere fixed rather than using strings directly. Review by community.