summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Improved an error message.Paul Phillips2011-09-284-16/+23
| | | | | Closes SI-4319, no review.
* Fix bug in ModuleDef elimination.Paul Phillips2011-09-281-0/+12
| | | | | Fixes corner case diagnosed by miguel. Closes SI-5012, no review.
* BigDecimal adjustments.Paul Phillips2011-09-282-0/+41
| | | | | | More sensible use of MathContext, plus some BigDecimal tests. Contributed by Erik Osheim. Closes SI-4981, no review.
* Fixes #4895.Aleksandar Pokopec2011-09-281-0/+20
| | | | | | | The size map size computation for parallel hash sets was invalid. No review.
* Fixes #4894.Aleksandar Pokopec2011-09-281-0/+27
| | | | | | | Adds Growable and Shrinkable to parallel maps and sets. No review.
* Adding latest failures to code.scala test.Martin Odersky2011-09-281-2/+10
|
* Added Paul's failing scenario to test file.Martin Odersky2011-09-281-1/+12
|
* Removed a log file from the test dir.Aleksandar Pokopec2011-09-271-6/+0
| | | | | No review.
* Fixes #4716.Aleksandar Pokopec2011-09-272-0/+16
| | | | | | | | | | | During the generation of the specialized method implementation, local lazy vals in specialized classes were getting duplicated and assigned new (different) names. Also, the identifiers referring to them were not getting updated. This is fixed now. Further, the mutable flag is no longer getting set for a lazy val during method body duplication. Review by Dragos.
* Correcting resolution of top-level objects in r...Martin Odersky2011-09-271-1/+1
| | | | | Correcting resolution of top-level objects in reflection.
* Added new test file for reification/relfection,...Martin Odersky2011-09-271-0/+33
| | | | | | Added new test file for reification/relfection, which does not work yet under partest, but works when run individually.
* removed redundant testMartin Odersky2011-09-271-20/+0
|
* ProductN, and method synthesis toolbox.Paul Phillips2011-09-265-87/+90
| | | | | | | | | | | | | | | | | | | | | | - Finished giving case classes a ProductN parent, and flipped it on. The "finish" part involved not breaking existing code where case classes manually extend the appropriate ProductN. (Like, Tuple 1-22.) - Generalized most of SyntheticMethods to ease method creation and class manipulation in general. - Fixed bugs related to the above, like the fact that this used to be a compile error: scala> case class Foo() extends Serializable <console>:28: error: trait Serializable is inherited twice case class Foo() extends Serializable ^ It feels like there's a better way to eliminate the duplicate parents, but after spending a lot of time chasing my tail in that peril-fraught zone between namer and typer, I don't see an easy path to improve on it. Closes SI-1799. For that modification to Typers, review by odersky.
* Disable currently failing pos/code.scala.Hubert Plociniczak2011-09-261-0/+0
|
* Fixes #4351.Aleksandar Pokopec2011-09-262-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added an "Abstract" method info to the specialized phase, which denotes that no implementation should be generated. Previously: trait A[@specialized(Boolean) T] { def foo: T } used to generate: trait A$mcZ$sp extends A[Boolean] { def foo$mcZ$sp = this.foo } which caused cyclic calls because of linearization rules when several traits are mixed together. Now, the following is generated: trait A$mcZ$sp extends A[Boolean] { def foo$mcZ$sp: Boolean } Review by dragos.
* Added test for the completion problem in the pr...skyluc2011-09-264-0/+53
| | | | | | Added test for the completion problem in the presentation compiler reported in the scala-ide ticket 1000620.
* Getting liftCode to work.Martin Odersky2011-09-254-1/+1
|
* Handling Freevars in Importers and discovering ...Martin Odersky2011-09-231-1/+3
| | | | | | Handling Freevars in Importers and discovering whole new classes of errors in Liftcode.
* Now correctly handles moduleclasses in ImportersMartin Odersky2011-09-231-7/+3
|
* Back to square one.Hubert Plociniczak2011-09-237-40/+36
| | | | | | | | | | | | | | Current design of error trees complicates the design of reflection library, and introduces sometimes unnecessary boilerplate and since I do not want to stall that work I am reverting all the changes related to error trees. A different design is currently under consideration but work will be done on separate branch on github. Revisions that got reverted: r25705, r25704 (partially), r25673, r25669, r25649, r25644, r25621, r25620, r25619 Review by odersky and extempore.
* Removed devirtualize.Paul Phillips2011-09-221-1/+1
| | | | | | | It was time. Removed unused flags and devirtualize detritus. Cleaned up flags a bit further. Fixed the contents of phaseNewFlags in those places where it was inaccurate. No review.
* more tweaks to symbol importing; not done yetMartin Odersky2011-09-221-3/+3
|
* Started work on compiler toolbox that can compi...Martin Odersky2011-09-211-1/+16
| | | | | | Started work on compiler toolbox that can compile reflect trees at runtime.
* Changes to Liftcode to use new reflection seman...Martin Odersky2011-09-203-8/+12
| | | | | | Changes to Liftcode to use new reflection semantics, where a compiler uses type checking.
* Fixes #4417.Aleksandar Pokopec2011-09-202-0/+24
| | | | | Review by Dragos.
* Added new disabled test for eclipse scala-ide t...Micro Dotta2011-09-163-0/+11
| | | | | | | Added new disabled test for eclipse scala-ide ticket1000609. Corrected test framework to fail nicely when the tree retrieved after an has no associated symbol.
* Refine lub calculation.Paul Phillips2011-09-131-0/+4
| | | | | | | When a reasonable lub cannot be arrived at by direct means, use the bounds of the lub inputs to derive bounds for the lub rather than giving up. Closes SI-4938, review by moors.
* Helping Proxy equal itself.Paul Phillips2011-09-102-0/+10
| | | | | Fix for bumpy proxy equals. Closes SI-4807, no review.
* Fix various InnerClasses bugs.Grzegorz Kossakowski2011-09-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes two major problems: 1. InnerClasses table missed entries that would close the chain between nested and top-level class. 2. In some situations, classes corresponding to objects would be not be reported in the InnerClasses table. For details it's the best to check SI-4819, SI-4820 and SI-4983. First problem mentioned above was straightforward to fix so I won't be going into details. The second one deserves more attention. From now, classes corresponding to objects are properly reported as inner classes. Also, members (classes, objects) of objects are reported as inner classes of classes corresponding to objects. There's one caveat though: top level objects get two classes (regular and mirror). Members of top-level objects are declared as inner classes of *mirror* class and not regular one. The reason for that is to allow importing them from Java. For example: object A { class B } will be compiled into following classes: A, A$, A$B. If we declared A$B as inner class of A$ (regular class for objects) then it would be impossible to import B using "import A.B" or "import A$.B" constructs. The reason for that is that Java compiler seems to blindly put dollars instead of looking at InnerClasses attribute. Since non-top-level objects don't have a mirror class it's impossible to use the same solution. Thus, in case like this: object A { object B { class C } } it's impossible to import C from Java. That's the tradeoff for fixing other (more serious) problems. It's never been possible to do that in a clean way so we are not making situation worse. As a nice consequence of this change, we get better way to refer to inner members of top-level objects. It's been reflected in one of test-cases that is updated by this change. Fixes SI-4789 SI-4819 SI-4820 SI-4983 and possibly some other tickets related to reflection. Review by extempore, dragos.
* Brought back unrelated type comparison warning.Paul Phillips2011-09-092-23/+30
| | | | | | Figured out how to turn it on by default, even. Closes SI-4979, no review.
* Allow for the overriding of objects.Paul Phillips2011-09-088-1/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various and sundry manipulations to allow for objects to be overridden when the mood is right. It is not enabled by default. The major contributor of change turned out to be the decoupling of the FINAL flag (and the "isFinal" test which examines only that flag) and the many semantics which were attributed to this interpretation of finality in different circumstances. Since objects no longer have the FINAL flag automatically applied (only top-level objects and those marked final in source code do) we need apply a more nuanced test. Fortunately there is such a nuanced test: isEffectivelyFinal, which is always true if the FINAL flag is set but also in various other circumstances. In almost every case, you should be testing "isEffectivelyFinal", not "isFinal". To enable overridable objects, use: -Yoverride-objects -Xexperimental // includes the above and others Remain to be done: working out transition logistics. Most likely this would involve bumping the scala signature version, and all objects in versions before that would be assumed final. Review by moors.
* 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.