summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Refinement of murmurhash implementation.Paul Phillips2011-09-081-68/+80
| | | | | | Integrates recent speed improvements to algorithm. Contributed by Ruediger Keller, no review.
* First refactoring related to Error trees.Hubert Plociniczak2011-09-077-36/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are no more direct calls to context.error from Typers and Infer, so more work needs to be done to finish it for Implicits and Namers. I am pushing it to trunk so that all of you can share my pain (and complain). Please do not add any more context.error randomly in that code, instead deal with it appropriately (by creating specific error tree). I was trying to be as informative when it comes to error tree names as possible, but if you feel like changing names to something more appropriate then feel free to do so. When it comes to printing error messages I tried to follow test suite as closily as possible but obviously there were few changes to some tests (mostly positive, I believe). On my machine performance drawback was neglible but I am working on more aggressive caching to reduce the penalty of containsError() calls even more. Any suggestions welcome. At the moment the code supports both styles i.e. throwing type errors for the cases that are not yet handled and generating error trees. But in the future we will drop the former completely (apart from cyclic errors which can pop up almost everywhere). Review by odersky, extempore and anyone who feels like it.
* Intersection types made specializable.Paul Phillips2011-09-062-0/+13
| | | | | | | | | | | | | Formerly a specializable type parameter would be missed if in an intersection. trait Trait[@specialized T] { def f[T](x: Foo[T] with Bar) = x } Now that is specialized, as it already was in the "Foo[T]" case. Closes SI-4794, no review.
* Moved test for scala-ide ticket-1000508 under /...Micro Dotta2011-09-053-0/+0
| | | | | | | | Moved test for scala-ide ticket-1000508 under /disabled/presentation/ directory, as the current test's result is wrong (the ticket is still opened). It will be moved back only once the ticket is closed. No review.
* Created test cases for tickets that need to be ...Micro Dotta2011-09-059-0/+45
| | | | | | | Created test cases for tickets that need to be fixed in the presentation compiler. These tests should eventually be moved under folder /files/presentation/ once they are working.
* Offer warning when demonstrably non-side-effect...Paul Phillips2011-09-0520-23/+83
| | | | | | | | Offer warning when demonstrably non-side-effecting expressions appear in statement position, which should be unintentional by definition. Threw in removal of six places with useless discarded expressions which the warning informed me about. No review.
* Made it possible to supply a custom Global to t...Paul Phillips2011-09-011-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | Made it possible to supply a custom Global to the core scala runners. The absence of "Global pluggability", combined with the fact that most of the functionality in Global is unnecessarily rigid due to the phases being implemented as objects, means that it has been close to impossible to do interesting compiler development in a way which doesn't require modifying the scalac source tree. This then leaves you continually subject to punishment by code drift as the various places you were forced to modify change out from under you. This is somewhat less true now, thanks to new option: -Yglobal-class The primary wielders of Global (fsc/scala/scalac) now instantiate the compiler via a (Settings, Reporter) => Global factory method in the Global companion. If -Yglobal-class was given, that class (which must have a (Settings, Reporter) constructor) will be instantiated if possible, falling back on the standard one. See test/files/pos/CustomGlobal.scala for a working example. (It's not in run because I would have to be able to give partest a different set of flags for successive compiles in the same test.) Review by odersky.
* Added package object support to reflection fram...Martin Odersky2011-08-291-2/+2
| | | | | | Added package object support to reflection framework. Removed debug output and made some speed improvements.
* Gave partial function an empty member.Paul Phillips2011-08-282-0/+17
|
* Fixed bug in Sorted "to" not using the ordering.Paul Phillips2011-08-272-0/+13
|
* More fixes/debug code for reflection.Martin Odersky2011-08-261-2/+2
|
* Sorting test output so it passes on java7, no r...Paul Phillips2011-08-252-4/+4
| | | | | Sorting test output so it passes on java7, no review.
* Renamed tests named bugXXX to tXXX, no review.Paul Phillips2011-08-24906-480/+480
|
* Removed and consolidated several redundant test...Paul Phillips2011-08-2413-286/+127
| | | | | | Removed and consolidated several redundant tests which had filenames "bugXXX" and "tXXX" where XXX == XXX. No review.
* New reification code for symbols and types.Martin Odersky2011-08-235-0/+0
|
* applying patch provided by Topher, fixes #3501.Tiark Rompf2011-08-232-0/+20
|
* Created infrastructure for testing icode + sett...Paul Phillips2011-08-222-0/+643
| | | | | | | | | | | | | | | | Created infrastructure for testing icode + settings/partest yak shaving. See enclosed test files/run/inline-ex-handlers.scala. To compare optimized and unoptimized icode after a given phase, all you need in a partest source file is this: import scala.tools.partest.IcodeTest object Test extends IcodeTest { override def printIcodeAfterPhase = "inlineExceptionHandlers" } Other things can be done, see IcodeTest.scala. Review by ureche.
* Bug in optimizer eliminated potentially excepti...Paul Phillips2011-08-213-0/+23
| | | | | | Bug in optimizer eliminated potentially exceptional not-dead code. Streamlined isSideEffecting logic. Review by ureche.
* [recommit] Backend optimization: Inline excepti...Vlad Ureche2011-08-191-27/+28
| | | | | | [recommit] Backend optimization: Inline exception handlers. Review by dragos.
* fixed svn props and presentation check filesmichelou2011-08-1910-23/+23
|
* Major rewrite of the testing infrastructure for...Micro Dotta2011-08-1792-92/+12505
| | | | | | | | | Major rewrite of the testing infrastructure for the presentation compiler. Added several new tests that will be part of the nightly build. Once the move to SBT is completed I will look into how to extract the test infrastructure (as it should really not be living in the compiler codebase). Review by dragos
* Improved the error message given when a concret...Paul Phillips2011-08-162-0/+15
| | | | | | Improved the error message given when a concrete method implementation doesn't match the abstract one. No review.
* Removing the code which has been deprecated sin...Paul Phillips2011-08-1553-174/+125
| | | | | | | Removing the code which has been deprecated since 2.8.0. Contributed by Simon Ochsenreither, although deleting code is such fun one hesitates to call it a contribution. Still, we will. Closes SI-4860, no review.
* fixed text in error messagemichelou2011-08-114-8/+8
|
* Fixes SI-4507.Kato Kazuyoshi2011-08-112-0/+27
|
* Expanded the range of a warning, and made suppr...Paul Phillips2011-08-103-0/+33
| | | | | | | | | | | Expanded the range of a warning, and made suppressed warnings visible. Modified the positioning of "permanently hidden" errors so that when there is more than one, the later ones are not ignored. Also changed the error suppression code to emit the error anyway if -Ydebug was given (it is prefixed with "[suppressed] ".) Since I can't be the only one who wondered where his errors were vanishing to. No review.
* Reversed the values of "is" and "is not" in rec...Paul Phillips2011-08-1015-51/+63
| | | | | | | | | | | | | | | | | | | | | | | | Reversed the values of "is" and "is not" in recent for comprehension deprecation. DO NOT BLOW HATCH REPEAT DO NOT BLOW HATCH "Roger! Hatch blown." Events reveal it was all baby, no bathwater. It turns out that the specification is merely a document, not infallible holy writ as we had all previously believed. So it is not the ABSENCE of val in a for comprehension assignment which is deprecated, it is the PRESENCE of val. Summarizing again, more accurately perhaps: for (x <- 1 to 5 ; y = x) yield x+y // THAT's the one for (val x <- 1 to 5 ; y = x) yield x+y // fail for (val x <- 1 to 5 ; val y = x) yield x+y // fail for (x <- 1 to 5 ; val y = x) yield x+y // deprecated No review.
* Optimizations for Seq's implementations of sequ...Paul Phillips2011-08-092-0/+64
| | | | | | Optimizations for Seq's implementations of sequence search algorithms. Contributed by Rex Kerr. Closes SI-4828, no review.
* Another "great moments in java5 vs.Paul Phillips2011-08-092-2/+1
| | | | | | | have lived through before: java5 wrongly prints "volatile" next to bridge methods, because ACC_BRIDGE uses the same bit as ACC_VOLATILE. Result: partest failure! No review.
* Fix java signature generation for traits: no cl...Paul Phillips2011-08-094-0/+53
| | | | | | Fix java signature generation for traits: no classes as parents. Closes SI-4891, review by grek.
* Don't discard deprecation/unchecked warnings re...Paul Phillips2011-08-092-0/+84
| | | | | | | | | | | | | | | Don't discard deprecation/unchecked warnings regardless of settings. Changed warnings code to accumulate them rather than thoughtlessly discarding them and issuing its well-known taunt. In the repl you can take advantage of this with the :warnings command, which will show the suppressed warnings from the last line which had any. Be advised that at the moment it has some issues: unchecked warnings aren't making it out, and near repl startup neither are deprecation warnings, so don't open a bunch of tickets please. References SI-4594, no review.
* Test update to go with the previous patch.Paul Phillips2011-08-081-12/+13
| | | | | update on this matter is yet to come, no review.
* Fixing all the tests and source which still use...Paul Phillips2011-08-0815-30/+65
| | | | | | | Fixing all the tests and source which still use the old for comprehension syntax with vals where there are no vals and no vals where there are vals. No review.
* Fix for a bug in CharArrayReader which made tri...Paul Phillips2011-08-082-0/+31
| | | | | | | | | | Fix for a bug in CharArrayReader which made triple quoted strings fail to parse sometimes. Note: when the temptation strikes to adjust for special cases by letting the regular case happen and subsequently attempting to fix the ball of mutation by selectively applying what seems like the inverse operation, please consider the possibility that this is not the optimal approach. Closes SI-4785, no review.
* Better error message for case class/object matc...Paul Phillips2011-08-073-0/+29
| | | | | | Better error message for case class/object match confusion. Closes SI-4879, no review.
* Avoid some spurious errors after a cyclical ref...Paul Phillips2011-08-072-0/+8
| | | | | | Avoid some spurious errors after a cyclical reference error. Closes SI-2388, no review.
* Improved structural type error messages, and ot...Paul Phillips2011-08-063-0/+45
| | | | | | Improved structural type error messages, and other error message related boosts. Closes SI-4877, review by odersky.
* Fixed bug in the disambiguation of f(foo='bar')...Paul Phillips2011-08-062-0/+13
| | | | | | | | Fixed bug in the disambiguation of f(foo='bar') style method calls in the presence of overloading, parameterization, and by-name arguments. Took the opportunity to clean things up a little bit. Closes SI-4592, review by rytz.
* Disallowed implicit modifier on auxiliary const...Paul Phillips2011-08-062-0/+7
| | | | | | | Disallowed implicit modifier on auxiliary constructors, since it either silently accomplishes nothing or crashes the compiler. If it should do something useful let me know. Closes SI-4882, review by odersky.
* Don't want to chase NPEs around for the rest of...Paul Phillips2011-08-061-0/+15
| | | | | | | | Don't want to chase NPEs around for the rest of my life. Created "NoCompilationUnit" and "NoSourceFile" objects to represent not-present versions of these items. Seems a lot better than null. References SI-4859, got past NPE only to uncover the actual problem. No review.
* Attacked classpaths to get "." off of it when i...Paul Phillips2011-08-063-0/+7
| | | | | | | | | | | | | Attacked classpaths to get "." off of it when it's not actually specified. The commit makes me nervous, but there's no invisible way to fix something like this. ** Attention, this commit changes classpath handling ** We desperately need some way of testing that the classpath has certain qualities and does not have others; partest is not that way. Closes SI-4857, no review.
* Some "synthetic" code don't have RangePosition.Kato Kazuyoshi2011-08-062-0/+17
|
* Rewrote the case class synthetic equals method ...Paul Phillips2011-08-052-0/+3
| | | | | | | Rewrote the case class synthetic equals method to be more efficient and to cause fewer problems for compiler hackers who are always saying stuff like "the only place this comes up is case class equals..." No review.
* Issue a warning about classes/objects inside pa...Paul Phillips2011-08-043-0/+11
| | | | | Issue a warning about classes/objects inside package objects, no review.
* Cleanups in Namers and AddInterfaces emerging f...Paul Phillips2011-08-041-1/+1
| | | | | | | | Cleanups in Namers and AddInterfaces emerging from bugfixing attempts and comprehension pursuits. I appear to have accidentally fixed at least one bug, as there are new (correct) warnings when building the compiler involving permanently hidden imports. No review.
* Made error messages like "object List is not a ...Paul Phillips2011-08-023-1/+12
| | | | | | Made error messages like "object List is not a value" be a little more helpful about why that is. No review.
* Sped up traversal over mutable maps by a factor...Paul Phillips2011-08-011-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sped up traversal over mutable maps by a factor of two. There was this comment in HashTable explaining why foreach was implemented in terms of iterator. /* * We should implement this as a primitive operation over the * underlying array, but it can cause a behaviour change in edge cases * where: * - Someone modifies a map during iteration * - The insertion point is close to the iteration point. */ Item 1: foreach and iterator didn't behave the same if the map was mutated in the midst of the traversal anyway. Item 2: protecting some particular undefinition of inherently undefined behavior is a pretty unconvincing reason to impose a 2x penalty on foreach. Here are the before/after times for traversing the keys with foreach vs. with iterator. Same impact on values and on the map itself. The benchmark code is included in this commit. before: foreach 143700900 iterator 143848900 after: foreach 67024400 iterator 144890300 Respecting the fact that this might be causing some behavior somewhere to change, even though it would be pretty sick to be relying upon it, ** ATTENTION! POSSIBLE BEHAVIOR CHANGE! ** Review by dragos.
* Working on jar creation infrastructure.Paul Phillips2011-08-014-0/+83
| | | | | | | | | | | | | | | | | | output generation (but only then, since otherwise we're not creating the jar): 1) -Xmain-class foo.Bar will give the jar a Main-Class of foo.Bar 2) Alternatively, if there is only one runnable program, that will be the Main-Class 3) Always, the jar's manifest will have an entry for Scala-Compiler-Version. Not very relatedly, a warning is now issued when a module has a main method but a runnable program will not be generated. Closes SI-4861. This represents an opening step toward automatically recognizing mismatched bytecode situations: coarse, but useful and safe. Review by mirco.
* LiftCode works again, now integrated with new r...Martin Odersky2011-07-303-1/+5
| | | | | | | | LiftCode works again, now integrated with new reflection library. Other changes: def Literal(x: Any) has been deprecated, and all its uses removed. Modifiers has lost positions as fourth case class argument; is now a field, mirroring Tree.pos (this removes junk in patterns and makes reification simpler). Review by extempore.
* Getting LiftCode to work.Martin Odersky2011-07-304-0/+0
|