summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Experimental option -Ybreak-cycles.Paul Phillips2012-10-0910-45/+99
| | | | | | | | | Overcomes cycles encountered during classfile parsing in possibly sketchy fashion. "illegal cyclic reference involving class Foo" is the watchword. See SI-3809.
* Possible fix for continuations bug.Paul Phillips2012-10-081-1/+1
| | | | | | | | | It comes looking for an implicit from (A @foo) => B and gives up, despite the fact that there is an implicit from A => B. Maybe there is some good reason for this, and/or I would fully believe there is a better way to fix it, but I'll propose this and wait to hear about the good reason and/or better way.
* Merge remote-tracking branch 'origin/2.10.0-wip' into merge-2.10Paul Phillips2012-10-0716-605/+6137
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/2.10.0-wip: MethodSymbol.params => MethodSymbol.paramss SI-6471 Update jquery from 1.4.2 to 1.8.2 undeprecates manifests for 2.10.0 SI-6451: Rename classes in `unchecked-abstract.scala` test. Put more implementation restrictions on value classes. Fixed problem in SI-6408 Revised restrictions for value classes and unversal traits SI-6436 Handle ambiguous string processors fixes a bug in a weak cache in runtime reflection Conflicts: test/files/neg/classmanifests_new_deprecations.check test/files/neg/unchecked-abstract.check
| * MethodSymbol.params => MethodSymbol.paramssEugene Burmako2012-10-074-9/+8
| | | | | | | | | | | | | | | | This matter was discussed at scala-internals: http://groups.google.com/group/scala-internals/browse_thread/thread/6414d200cf31c357 And I am convinced with Paul's argument: consistency of the convention is very important.
| * Merge pull request #1455 from scalamacros/topic/manifestsJosh Suereth2012-10-055-11/+22
| |\ | | | | | | undeprecates manifests for 2.10.0
| | * undeprecates manifests for 2.10.0Eugene Burmako2012-10-035-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | Since scala-reflect.jar is going to be declared experimental for 2.10.0, it doesn't make sense to deprecate manifests in favor of type tags. Class manifests, however, ARE deprecated for class tags, because class tags don't require scala-reflect.jar and are generated independently of type tags.
| * | SI-6471 Update jquery from 1.4.2 to 1.8.2Vlad Ureche2012-10-043-557/+6035
| |/ | | | | | | | | | | | | | | This reopens SI-6170 that was fixed by 1be1f760. I don't want to start a revert war, but I see two reasons we should stick to newer jquerys: - they provide better compatibility to new browsers - having diagrams not working is much more annoying than having the splitter not work
| * Merge pull request #1443 from gkossakowski/anyval-restrictionsGrzegorz Kossakowski2012-10-033-26/+69
| |\ | | | | | | AnyVal/value classes restrictions
| | * Put more implementation restrictions on value classes.Grzegorz Kossakowski2012-10-031-10/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nested objects, classes and lazy vals are disallowed at any nesting level in value classes; e.g. lazy vals local to a method defined in a value class. There are still allowed in universal traits. This is a temporary, implementation restriction that is planned to be addressed in future releases of Scala. Error messages has been updated to communicate that intent. Moved tests for SI-5582 and SI-6408 to pending folder. They have to stay there until implementation restrictions are addressed. Closes SI-6408 and SI-6432. Review by @odersky, @harrah and @adriaanm.
| | * Fixed problem in SI-6408Martin Odersky2012-10-031-1/+2
| | | | | | | | | | | | Fixed problem reported in comment, where inner classes of value classe caused a compiler crash.
| | * Revised restrictions for value classes and unversal traitsMartin Odersky2012-10-032-25/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | and brought compiler in line with them. One thing we can accept IMO are nested classes (nested objects are still a problem). In fact, it makes no sense to exclude nested classes from value classes but not from universal traits. A class nested in universal trait will becomes a class nested in a value class by inheritance. Note that the reflection library already contains a universal trait with a nested class (IndexedSeqLike), so we should accept them if we can.
| * | Merge pull request #1446 from retronym/ticket/6436-2Grzegorz Kossakowski2012-10-031-1/+1
| |\ \ | | | | | | | | SI-6436 Handle ambiguous string processors
| | * | SI-6436 Handle ambiguous string processorsJason Zaugg2012-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, we got in an inifinite loop by chasing the error typed result of adaptToMemberWithArgs. One point of befuddlement remains: why did t6436 and t6436b behave differently before this change?
| * | | Merge pull request #1439 from scalamacros/topic/reflective-uniquesJosh Suereth2012-10-021-1/+2
| |\ \ \ | | |_|/ | |/| | fixes a bug in a weak cache in runtime reflection
| | * | fixes a bug in a weak cache in runtime reflectionEugene Burmako2012-10-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Entries in SynchronizedTypes.uniques could previously be garbage collected in-between a successful call to contains and an actual cache lookup. The patch could be a one-liner, but I don't want to use HOFs in this function, whose prototype is a hotspot in the compiler. Also the fix doesn't touch scalac in any way. It only applies to reflective universes that provide runtime reflection functionality.
* | | | Merge pull request #1382 from paulp/topic/tpe_starPaul Phillips2012-10-0724-191/+212
|\ \ \ \ | | | | | | | | | | Defanged dummy type arguments.
| * | | | Overhauled documentation and structure of tpe/tpeHK/etc.Paul Phillips2012-10-022-83/+99
| | | | | | | | | | | | | | | | | | | | | | | | | Trying to make the code structure as hotspot friendly as I can, which is no mean feat.
| * | | | All the actual changes of tpe to tpe_* or tpeHK.Paul Phillips2012-10-0223-49/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are the call sites which formerly could be seen to call .tpe on a symbol with unapplied type parameters. Now each such call site makes an explicit choice about what is intended for the result type.
| * | | | Hardening in appliedType and Subst*Map.Paul Phillips2012-10-021-26/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All driven by the knowledge gained from logging all the calls to tpe and appliedType and seeing what was coming through there. Some needless type creation is avoided in the maps, and appliedType will squawk to those who listen when it sees something out of order.
| * | | | Cleanup in old Typers code.Paul Phillips2012-10-021-37/+22
| | | | | | | | | | | | | | | | | | | | Using established facilities for doing established things.
| * | | | Defanged dummy type arguments.Paul Phillips2012-10-021-14/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Spending a few hours on yet another tpe vs. tpeHK bug drove me to finally go after the dragon in his cave. I created a separate method for when you want to receive an invalid type which will cause mysterious crashes later if it is out of your sight for five seconds. def tpeHK : Type // unapplied type params stay unapplied def tpe_* : Type // unapplied type params applied as dummy args def tpe : Type // if there are unapplied type params, ABORT Actually it doesn't really abort, but I had it print a stack trace during development so I could track down every site which blindly calls tpe and see why they were doing it. Now it only admonishes you under -Ydebug. This way is a big step forward: you have to make a choice, which is good, because if you choose not to decide you still have made a choice, only mostly what you have chosen is bugs.
| * | | | Removed obsolete migration test.Paul Phillips2012-10-021-13/+0
| | | | | | | | | | | | | | | | | | | | Arrays are not Seqs: a fact known by all and sundry.
* | | | | Merge pull request #1466 from jroper/patch-1Paul Phillips2012-10-061-3/+4
|\ \ \ \ \ | | | | | | | | | | | | SI-6478 Fixing JavaTokenParser.ident
| * | | | | SI-6478 Fixing JavaTokenParser identJames Roper2012-10-051-3/+4
| | | | | |
* | | | | | Incorporated pull request feedback.Paul Phillips2012-10-052-37/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And fixed the test I broke at the last minute. Reworked tupling logic to make it harder to break. Expanded test coverage.
* | | | | | Merge branch 'master' into infer-method-alternativePaul Phillips2012-10-0526-128/+201
|\ \ \ \ \ \
| * \ \ \ \ \ Merge pull request #1447 from paulp/spuriousPaul Phillips2012-10-044-30/+39
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | | Spurious warning elimination.
| | * | | | | Fix for spurious warning.Paul Phillips2012-10-043-27/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminates spurious "catch block may intercept non-local return" seen in recent builds of master. Unified some catch logic in TreeInfo, and removed some which never worked.
| | * | | | | Eliminated pattern matcher warning.Paul Phillips2012-10-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implicit extractor must be available to pattern match on abstract type. Requires prior commit not to crash under -Yrangepos.
| | * | | | | Fix for rangepos crasher.Paul Phillips2012-10-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wrapClassTagUnapply was generating an unpositioned tree which would crash under -Yrangepos. See SI-6338.
| * | | | | | Merge pull request #1369 from som-snytt/issue/6406-regextractPaul Phillips2012-10-041-34/+64
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | Regex.unapplySeq should not take Any (Fixes SI-6406)
| | * | | | | | Regex.unapplySeq should not take Any (Fixes SI-6406)Som Snytt2012-09-201-34/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This deprecates unapplySeq(Any) and adds overloaded unapplySeq(CharSequence) and unapplySeq(Match), with the putative advantage that you can't try to extract the unextractable. Regex is massaged so that the underlying Pattern is primary, rather than the String-valued expression. Regex and its unanchored companion (I almost wrote unmoored) share a Pattern object, so that unapplySeq(Match) can easily test whether the Match was generated by this Regex; in that case, the match result is used immediately, instead of reapplying the regex to the matched string. The documentation is massaged to reflect unanchored and also to align with the underlying terminology, e.g., "subgroup" really just means "group."
| * | | | | | | Merge pull request #1429 from paulp/topic/shortClassPaul Phillips2012-10-044-13/+46
| |\ \ \ \ \ \ \ | | |_|/ / / / / | |/| | | | | | Added utility function shortClass.
| | * | | | | | Added utility function shortClass.Paul Phillips2012-09-294-13/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pretty sick of names like scala> typeOf[List[Int]].getClass.getName res0: String = scala.reflect.internal.Types$TypeRef$$anon$1 I wrote this so I can see what the class of some arbitrary thing is in a way which my little brain can understand. For the example above we get scala> shortClassOfInstance(typeOf[List[Int]]) res0: String = ArgsTypeRef with AliasTypeRef Let's pimp a "shortClassName" onto AnyRef and be happy.
| * | | | | | | Merge pull request #1456 from paulp/has-symbol-fieldPaul Phillips2012-10-0418-51/+52
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Renamed hasSymbol to hasSymbolField.
| | * | | | | | | Renamed hasSymbol to hasSymbolField.Paul Phillips2012-10-0318-51/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggestion by retronym that the obvious implementation of "hasSymbol" be called "hasSymbol" reminded me we have a method called "hasSymbol" which does not have that implementation, and which has burned us already with subtle bugginess. I think that "hasSymbolField" is self-documenting.
* | | | | | | | | Worked over inferMethodAlternative.Paul Phillips2012-10-043-186/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We shouldn't let these core methods become so complicated. They are way harder to follow than is necessary. It is why nobody ever fixes the bugs in them. This is only the beginning really. So many things in the compiler would border on trivial to fix if one didn't have to navigate so much cruft and indirection. Here are some methods which no longer exist: - hasExactlyNumParams. A dubious name for a method containing the expression "len <= n + 1". - resolveOverloadedMethod. A method which returns a list of symbols can't be resolving all that much. - isUnitForVarArgs. Take a guess as to what that method does. Ha ha, you were not even close. Still on my hit list: - "very similar logic to doTypedApply in typechecker" I find a good rule of thumb is never to write a comment which paraphrases to "this is very similar to that." This entire patch is the fault of a. moors for trying to cherry-pick a comment of mine from github into trunk. This patch hopefully makes the comment unnecessary.
* | | | | | | | | Replaced some <code> comments.Paul Phillips2012-10-041-20/+20
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | With the far more readable not-html comments of modern times.
* | | | | | | | Merge pull request #1460 from axel22/issue/6467-cherry-masterJosh Suereth2012-10-044-9/+11
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-6467: Zero element in aggregate now by-name
| * | | | | | | | SI-6467: Zero element in aggregate now by-nameAleksandar Prokopec2012-10-044-9/+11
| | | | | | | | |
* | | | | | | | | Fix for gluttunous raw type creation.Paul Phillips2012-10-041-8/+10
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ClassfileParser had a bug which led to it thinking pretty much anything might be a raw type, and thus creating extra symbols for no good reason. When compiling scala.collection, before this change it thought 1094 raw types had passed by; afterward it thought 237.
* | | | | | | | Merge pull request #1453 from vigdorchik/links_fixedPaul Phillips2012-10-032-3/+3
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Fix scaladoc links in a couple of places.
| * | | | | | | Fix scaladoc links in a couple of places.Eugene Vigdorchik2012-10-032-3/+3
| | | | | | | |
* | | | | | | | Merge remote-tracking branch 'scala/2.10.x'Grzegorz Kossakowski2012-10-0332-131/+324
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | / / / | | |_|_|/ / / | |/| | | | | | | | | | | | Conflicts: build.number src/reflect/scala/reflect/internal/Types.scala
| * | | | | | Merge pull request #1434 from jsuereth/fix/SI-6449Grzegorz Kossakowski2012-10-022-5/+5
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | Fixes deprecation annotations for 2.10.0
| | * | | | | | Fixes deprecation annotations for 2.10.0Josh Suereth2012-09-303-7/+7
| | | |_|_|_|/ | | |/| | | |
| * | | | | | Merge pull request #1440 from VladUreche/issue/language-docGrzegorz Kossakowski2012-10-024-27/+77
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | Improved the `scala.language` documentation
| | * | | | | | Improved the `scala.language` documentationVlad Ureche2012-10-024-27/+77
| | | |_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also corrected the links in the library rootdoc. **Note: We need to fast track this commit so it reaches master in the next 12 hours, before we generate the next nightly docs.** Review by @odersky
| * | | | | | Merge pull request #1425 from phaller/issue/6442Grzegorz Kossakowski2012-10-023-42/+61
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | | SI-6442 - Add ActorDSL object for actor migration kit
| | * | | | | SI-6442 - Add ActorDSL object for actor migration kitphaller2012-09-293-42/+61
| | |/ / / / | | | | | | | | | | | | | | | | | | Removes MigrationSystem, since ActorDSL replaces it.