summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Make AnyValManifest not a sealed class.Grzegorz Kossakowski2012-01-151-1/+1
| | | | | | | | Scala+GWT has a whole new hierarchy of Manifests that does not use reflection. Every type in new hierarchy is a subtype of a type from old hierarchy. Sealed modifier introduced in 2e92de4cd66532404081eec6b9e82c6f85b51434 breaks this scheme. Removing it so Scala+GWT can compile again.
*-----. Merge remote-tracking branches 'szabolcsberecz/xml-attribute-order', ↵Paul Phillips2012-01-157-6/+83
|\ \ \ \ | | | | | | | | | | | | | | | 'szabolcsberecz/pathsettings-jar-location-fix', 'dcsobral/issue/5371' and 'dcsobral/issue/5370' into develop
| | | | * Reword confusing explanationDaniel C. Sobral2012-01-141-7/+11
| | | | |
| | | | * Explain Function1 vs PartialFunctionDaniel C. Sobral2012-01-132-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an explanation in PartialFunction as to how it differs from Function1, with examples of what it can do that Function1 cannot. Make it explicit that calling apply may throw exceptions in both of them, even in the case where isDefinedAt returns true. Closes SI-5370.
| | | * | Improve description of flatten, flatMapDaniel C. Sobral2012-01-133-2/+38
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | Add examples and better explain the expected return type of the methods flatMap and flatten. Closes SI-5371.
| | * | Fixed instrumented.jar and scalacheck.jar locationSzabolcs Berecz2012-01-141-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on the file order in the directory, PathSettings.srcSpecLib could end up as "instrumented.jar.desired.sha1" instead of "instrumented.jar" which would cause all the specialized tests to fail. The same goes for scalacheck.jar
| * | | Preserve attribute order in inline XMLSzabolcs Berecz2012-01-141-1/+1
| |/ /
* | | Fix for raw types issue found in the IDE.Paul Phillips2012-01-141-5/+5
| | |
* | | Putting some of the symbol potential to work.Paul Phillips2012-01-1410-153/+141
| | | | | | | | | | | | | | | | | | | | | | | | Renamed the parameter to all the newXXX symbol creators to "newFlags" because I've seen too many bugs which arose from having a parameter name which shadows a field and where mistakes can inflict subtle bugs which won't be found until much later (yes I'm trying to describe "flags" right now.) Opportunistically cleaned up some symbol creations.
* | | Symbols making friends with Polly Morphism.Paul Phillips2012-01-1411-98/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since I have established (no small effort, this) that there is no need for certain important flags to be mutable for the entire lifetime of a symbol, I have codified this knowledge by moving it out of the flags entirely and into the inheritance hierarchy where its constant nature can find true happiness. AliasTypeSymbol ... it's an alias (forever!) AbstractTypeSymbol ... it's an abstract type (forever!) The only time DEFERRED is inspected is if the generic creation function is called (e.g. "newTypeSymbol", not "newAliasType") in which case the presence of the flag is used to determine which symbol to create. This is mostly for legacy support. Certain symbols were being created inconsistently with the others. Now every symbol is created by invoking a creation method on the owner, with the exception of FreeVar. I changed the owner of those from RootClass to NoSymbol because there is no reason for them to pollute the symbol hierarchy at the root. The signature of cloneSymbolImpl is now def cloneSymbolImpl(owner: Symbol, newFlags: Long): Symbol There is an overload with the old signature which calls that one with no flags. With this step, every symbol creation in trunk is performed with knowledge of the initial flags, opening the door to many optimizations in the Symbol and Type logic, not to mention boosting my sanity by at least five sanity points.
* | | Toward the elimination of setInternalFlags.Paul Phillips2012-01-143-23/+24
| | | | | | | | | | | | | | | | | | Modifications in LiftCode to avoid upsetting the happy world upon which I am converging where flags change in an almost predictable fashion.
* | | Corresponding changes in ICodeReader.Paul Phillips2012-01-141-26/+8
| | |
* | | Flattening the java flags -> scala logic.Paul Phillips2012-01-141-22/+58
|/ / | | | | | | To make the choices more transparent.
* | Fix for crasher in uncurry.Paul Phillips2012-01-131-2/+6
| | | | | | | | A small dose of packedType closes SI-4869.
* | Fix for spurious implicit ambiguity with package objects.Paul Phillips2012-01-131-5/+13
| | | | | | | | Closes SI-3999. Review by @odersky.
* | Fixed overloading in package objects.Paul Phillips2012-01-131-1/+18
|/ | | | | | | | | | | | | Implementing a warning for the behavior described in SI-1987 gave me enough of a foot in the door to fix it rather than warning about it. I suppose this is a variation of rubber ducky debugging. % scalac -Ylog:typer test/files/run/t1987.scala [log typer] !!! Overloaded package object member resolved incorrectly. Discarded: def duh(n: Double): Unit Using: val duh: (n: Double)Unit <and> (n: Long)Unit Review by @odersky.
* Removed some unsociable exception behavior.Paul Phillips2012-01-131-7/+0
|
* Merge remote-tracking branch 'szabolcsberecz/xml-attribute-fixes' into developPaul Phillips2012-01-121-6/+9
|\
| * Cleanup after "Fixed equality and string representation of xml attributes ↵Szabolcs Berecz2012-01-121-6/+9
| | | | | | | | | | | | | | | | | | | | with null value" This commit reverts the following two commits: 5f2568e36b87d183fd4e4442d5c304db628846c4 - "Revert "Accept prefixed xml attributes with null value" b00002f9049c034510438881b4a4449d73fe2f54 - "Disabling some scaladoc tests." and fixes a scaladoc test broken by: 4787f883604d1344257c0b40c15790c3dde477f2 - "Fixed equality and string representation of xml attributes with null value"
| |
| \
| \
| \
*---. \ Merge remote-tracking branches 'axel22/issue/4147', 'schmmd/codec' and ↵Paul Phillips2012-01-1225-866/+422
|\ \ \ \ | |_|_|/ |/| | | | | | | 'soc/SI-4627' into develop
| | | * Clean up standard/swing library by deprecating/moving code examplesSimon Ochsenreither2011-12-0720-866/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deprecate scala/xml/include/sax/Main.scala. Move scala/swing/test/* to docs/examples. Saves 160KB in scala-swing.jar. Fixes SI-4627.
| | * | Added toString to Codec class (uses Codec.name).Michael Schmitz2012-01-091-0/+3
| | | |
| * | | Merge branch 'master' into issue/4147aleksandar2012-01-12158-3773/+5443
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore
| * | | | Add mutable tree sets to the standard library.aleksandar2012-01-124-0/+418
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implementation is based on AVL trees. The current implementation is contributed by Lucien Pereira. Fixes #4147.
* | | | | Disambiguate some type printing.Paul Phillips2012-01-121-2/+5
| | | | | | | | | | | | | | | | | | | | Functions of functions use parens for grouping.
* | | | | Streamlining output of -Yinfer-debug.Paul Phillips2012-01-123-83/+55
| |/ / / |/| | | | | | | | | | | Also exposed some typevar related code outside a method.
* | | | Optimizing TypeRef, starting with Symbols.Paul Phillips2012-01-1140-590/+616
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are too many potential optimizations unavailable to us due to the lack of bright lines among different kinds of symbols. For instance the difference between a TypeSymbol which represents a type alias and one which represents an abstract type is only whether the DEFERRED flag is set. This creates issues. 1) There are many (many) places where tests are performed on every symbol which could be done more efficiently and (especially) more verifiably correctly with polymorphism. 2) TypeRefs based on those symbols are also checking that flag constantly, in perpetuity. A symbol created as an alias is never (to the best of my knowledge) going to intentionally morph into one representing an abstract type, nor vice versa. 3) One has no guarantees, because anyone can set or reset the DEFERRED flag at any time. So tackling more than one problem at once herein: 1) I created canonical symbol creation points which take the flags as an argument, so that there can be a difference between initializing a symbol's flags and setting/resetting them at arbitrary times. 2) I structured all the symbol creators to take arguments in the same order, which is: def newXXX(name: Name, ..., pos: Position = NoPosition, flags: Long = 0L) (Where "..." is for those symbols which require something beyond the name to create, such as a TypeSkolem's origin.) The name is first because it's the only always required argument. I left but deprecated the variations which take (pos, name). 3) I created subclasses of TypeRef based on the information which should be stable from creation time onward: - args or no args? - abstract type, type alias, or class? 2x3 == 6 and that's how many subclasses of TypeRef there are now. So now, for example, every TypeRef doesn't have to carry null symInfoCache and thisInfoCache fields for the benefit of the minority which use them. I still intend to realize the gain possible once we can evade the fields for pre and args without losing pattern matcher efficiency.
* | | | Inlining in Parsers.Paul Phillips2012-01-113-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | Work around optimizer's unwillingness to inline trait methods by flipping to an abstract class. Also eliminated a couple other warnings noising up the optimized build.
* | | | Rescued some import-related code.Paul Phillips2012-01-102-15/+29
| | | | | | | | | | | | | | | | So I can get at it from the repl.
* | | | Traitified JavaConverters.Paul Phillips2012-01-101-1/+4
| | | | | | | | | | | | | | | | So it can be used as a mixin.
* | | | Merge remote-tracking branch 'odersky/master'Paul Phillips2012-01-107-7/+7
|\ \ \ \
| * | | | Fixing redundant type parameter in toIndexedSeq which causes suboptimal type ↵Martin Odersky2012-01-107-7/+7
| | | | | | | | | | | | | | | | | | | | inference
* | | | | Revert "Accept prefixed xml attributes with null value"Paul Phillips2012-01-101-9/+6
|/ / / / | | | | | | | | | | | | | | | | This reverts commit 51089b34a7a535498dee42e6465d4d577d65b7d5. A scaladoc test is failing and I have no time to look at it.
* | | | Revert "Restored an implicit."Paul Phillips2012-01-091-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit daeb8f75ec3db065703d225fdb7f0aca34514333. That didn't go well.
* | | | Restored an implicit.Paul Phillips2012-01-091-3/+5
| | | | | | | | | | | | | | | | Because sbt's generated API code depends on it.
* | | | Better error reporting regarding main methods.Paul Phillips2012-01-093-33/+54
| |/ / |/| | | | | | | | | | | | | | Now notices most things which look like main methods and says something useful if they aren't usable as entry points. Closes SI-4749.
| | |
| \ \
| \ \
| \ \
*---. \ \ Merge remote-tracking branches 'odersky/master', 'odersky/topic/capturing' ↵Paul Phillips2012-01-095-11/+16
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | and 'szabolcsberecz/xml-attribute-fix'
| | | * | | Accept prefixed xml attributes with null valueSzabolcs Berecz2012-01-071-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes makes PrefixedAttribute work the same way as UnprefixedAttribute with respect to null values: <t p:a={ null: String }/> is accepted and results in <t/>
| | | * | | Fixed equality and string representation of xml attributes with null valueSzabolcs Berecz2012-01-074-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this patch <t a={ null: String }/> was not equal to <t/> and it's string representation was "<t ></t>" instead of "<t></t>" This includes changing MetaData.normalize() so that it doesn't reverse the chain. On the downside, the iterate function in MetaData.normalize() is not tail-recursive now.
| | * | | | Changed boxing of free mutable variables to be flexible wrt when liftcode ↵Martin Odersky2012-01-028-122/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | takes place. A major redesign that unifies the various different approaches to boxing of free variables. Free variables are marked with CAPTURED and eliminated by LambdaLift. I also added some hooks in MacroContext that a reifier needs to use.
| | * | | | Hardening of adaptoNewRun to survive issues in presentation compiler.Martin Odersky2012-01-011-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | Previously, adaptToNewRun crashed when an object declaration got replaced by a value with the same name, because the module class no longer existed. This caused crashes in the presentation compiler when class files disappeared because of a clean build. The new behavior avoids assertion errors.
| * | | | | Closes SI-5354.Martin Odersky2012-01-042-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason why the test case compiled without error is pretty devious: When checking the `Foo.x' implicit, a CyclicReference error occurs which causes the alternative to be discarded. Why a CylicReference? Because the inferencer tries to decide whether the owner of `z` is a subclass of the owner od `x`. To do this, it computed the info of the owner of `z1`, which is not complete because no result type for `f1` was given. Hence a CyclicReference error. The fix is twofold: (1) We make isNonBottomSubClass smarter so that it always returns false if the symbol in question is not a type; hence the info need not be computed. (2) It's dubious to swallow CyclicReference errors anywhere, but I deemed it too risky to propagate them. But at least the CyclicReference is now logged if -Ylog-implicit is true. This hopefully spares future maintainers the same detective work I had to go through when digging this out.
* | | | | | Fix for PartialFunction NPE.Paul Phillips2012-01-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Was going straight to the field and bypassing the null guard. Closes SI-5300.
* | | | | | Don't hard fail over missing classfiles.Paul Phillips2012-01-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to blow up when a classfile references other classes which aren't present. We can struggle onward and maybe it'll turn out they had no intention of trying to get at the class that isn't there. I have all kinds of confidence scala will find a way to fail when the time comes. Closes SI-5343.
* | | | | | Cleanups in Cleanup.Paul Phillips2012-01-076-85/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seeing about getting delayedInit working (not to mention the breakage it is inflicting elsewhere) which led me into Cleanup and some of its buddies.
* | | | | | Made type constraint propagation off by default.Paul Phillips2012-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wow, it fails only during strap.comp. That is certainly a first for me, managing to build quick and pass all the tests only to be unable to rebuild the compiler from quick. Must be something fascinating taking place in there. So for now I flipped the switch back down.
* | | | | | TypeConstraint/TypeVar refinement.Paul Phillips2012-01-072-24/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I zeroed in on the actual conditions under which the parameter bounds can be utilized without poisoning the well. Also fixed a bug in ClassfileParser where it would get confused and set Any as a lower bound, as well as a bug or at least misbehavior where a TypeBounds with only Any/Nothing as an upper/lower bound would be treated differently than one with no bound at all. Review by @moors.
* | | | | | Made Array manifests return type arguments.Paul Phillips2012-01-072-3/+3
| |_|/ / / |/| | | | | | | | | | | | | | Closes SI-3758.
* | | | | Remedy spurious bounds conformance failure.Paul Phillips2012-01-061-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Misters hkarg and hkparam have to work harder to see things from the same perspective, so they don't end up in a huff over bounds which were the same all along. Closes SI-5020, review by @moors.
* | | | | Output improvements for TypeVar tracing.Paul Phillips2012-01-061-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | You should really try this out, anonymous commit log reader. scala -Dscalac.debug.tvar