summaryrefslogtreecommitdiff
path: root/src/scalap
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* The first reasonably satisfying classpath commit.Paul Phillips2010-02-181-1/+1
| | | | | there with this one. Documentation to come. Review by community.
* Some new tools for the tools directory.Paul Phillips2010-02-152-1/+12
| | | | | | | | | | | | | | | | | | | | | amounts to a yak shaving expedition to enable this, which now works: tools/diffPickled scala.Either and since stability is presently broken you will see the following. (When it's not broken you will see nothing.) 541,544c541,544 < 538,4090: EXTref 3: 539(Left) 2 < 539,4095: TYPEname 4: Left < 540,4101: EXTref 3: 541(Right) 2 < 541,4106: TYPEname 5: Right --- > 538,4090: EXTref 3: 539(Right) 2 > 539,4095: TYPEname 5: Right > 540,4102: EXTref 3: 541(Left) 2 > 541,4107: TYPEname 4: Left
* More work on classpaths.Paul Phillips2010-02-111-0/+1
| | | | | | | | | which we must have no test cases at all. In the short term there will probably be a few more minor disruptions since with classpaths constructed a half dozen different ways, achieving consistency requires flushing out the undocumented accidents upon which any given island might depend. Review by community.
* More work on classpaths.Paul Phillips2010-02-101-7/+3
| | | | | | | | to have command line options following source files, at the price of temporarily breaking tools/pathResolver. Working my way through all the usages of classpath in trunk zeroing in on fully consistent handling. Review by community.
* A more MSIL-aware attempt at isolating the plat...Paul Phillips2010-02-061-4/+5
| | | | | | | | A more MSIL-aware attempt at isolating the platform dependent pieces of Global and ClassPath so we don't introduce unwanted dependencies. Introduces a small interface backend.Platform which encapsulates that data. Review by rytz, odersky.
* scalap output bug fixedilyas2010-02-051-1/+1
|
* some scalap tweaksilyas2010-02-052-22/+31
|
* Raised the level of abstraction (slightly, not ...Paul Phillips2010-02-041-3/+3
| | | | | | | | | Raised the level of abstraction (slightly, not enough) on ClassPath by defining the difference between optimized and regular classpaths in terms of an arbitrary name filter instead of in terms of settings.XO. Altered the decision logic to look at the value of -Yinline instead of -optimise. Closes #2950. Review by rytz.