summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1184 from pavelpavlov/partialfunGrzegorz Kossakowski2012-08-292-0/+92
|\ | | | | PartialFunction polishing
| * PartialFunction polishingPavel Pavlov2012-08-232-0/+92
| | | | | | | | | | | | | | | | | | - ScalaDocs added - TODOs fixed - controversive method `run` deleted - not used class runtime.AbstractTotalFunction removed - small corrections & fixes - tests for `orElse` & `runWith`
* | Merge pull request #1206 from paulp/issue/6283Grzegorz Kossakowski2012-08-292-0/+5
|\ \ | | | | | | Fix for SI-6283, no abstract value classes.
| * | Fix for SI-6283, no abstract value classes.Paul Phillips2012-08-282-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | The needless abstraction penalty was in full flower in Namers. I managed to find somewhere else to issue this error, where I can still just write an error message without tracking down an enumeration in a separate file and inventing an intermediate name for the enum member.
* | | Merge pull request #1195 from Blaisorblade/topic/test-tryGrzegorz Kossakowski2012-08-291-1/+13
|\ \ \ | |/ / |/| | Add missing tests for SI-6190
| * | Add missing tests for SI-6190Paolo Giarrusso2012-08-251-1/+13
| | | | | | | | | | | | | | | This was silently fixed in commit 3cb0e784a05db7d0b542cec9bf4c5fbf3772a6cf but no test was added.
* | | Merge pull request #1188 from retronym/ticket/6272Josh Suereth2012-08-282-0/+72
|\ \ \ | | | | | | | | SI-6272 Support lazy vals defined in try in template.
| * | | SI-6272 Support lazy vals defined in try in template.Jason Zaugg2012-08-242-0/+72
| |/ /
* | | Merge pull request #1185 from paulp/210-updateConservePaul Phillips2012-08-281-12/+15
|\ \ \ | | | | | | | | Eliminated a metric ton of allocations.
| * | | Eliminated a metric ton of allocations.Paul Phillips2012-08-231-12/+15
| | |/ | |/| | | | | | | | | | | | | | | | Thanks to the hotspot DTrace probes. I'm not sure why this checkfile changed, but hopefully it's innocuous. Review by @VladUreche for the checkfile and @gkossakowski so he can tell me how much faster.
* | | SI-6281 macroArgs for defs with implicit argsEugene Burmako2012-08-254-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | macroArgs now correctly calculates the argss in case when a macro def has implicit parameters. Macro impls can never have implicit parameters other than type tag evidences, so tags will always come in a separate parameter list w.r.t other parameters of macro impls (which are in 1-to-1 correspondence with the parameters of macro defs). Example 1: def w/o implicits: (params1)...(paramsN) impl w/o tags: (params1')...(paramsN') Example 2: def w/o implicits: (params1)...(paramsN) impl w tags: (params1')...(paramsN')(implicit tags) Example 3: def w implicits: (params1)...(paramsN)(implicit paramsN+1) impl w/o tags: (params1')...(paramsN')(paramsN+1') Note: paramsN+1' is not an implicit parameter list because impls cannot have implicit parameters other than tags Example 4: def w implicits: (params1)...(paramsN)(implicit paramsN+1) impl w tags: (params1')...(paramsN')(paramsN+1')(implicit tags) Therefore we don't need to merge the argss.last (that correspond to implicit parameters of macro defs) with tags, as it was incorrectly coded before. We just need to append tags to argss.
* | | SI-6052 - fix groupBy on parallel collectionsAleksandar Prokopec2012-08-241-0/+21
| |/ |/|
* | Merge pull request #1179 from scalamacros/topic/classtag-of-nothingPaul Phillips2012-08-231-30/+30
|\ \ | |/ |/| reverts changes to ClassTag.Nothing
| * reverts changes to ClassTag.NothingEugene Burmako2012-08-221-30/+30
| | | | | | | | | | | | | | | | It seemed to be a good idea to have ClassTag.Nothing crash in agreement with its incalculable nature. However this breaks CanBuildFrom for the situations when Nothing is inferred or provided explicitly. Hence the rollback.
* | Merge pull request #1182 from paulp/issue/1987Josh Suereth2012-08-236-0/+46
|\ \ | | | | | | Improved fix for SI-1987, overloading in package objects.
| * | Improved fix for SI-1987, overloading in package objects.Paul Phillips2012-08-226-0/+46
| | | | | | | | | | | | | | | | | | When reformulating an errant package object overload, don't forget to fully qualify it lest you trade one error for another.
* | | Merge pull request #1172 from Blaisorblade/topic/deprecated-conversionJosh Suereth2012-08-233-0/+33
|\ \ \ | | | | | | | | JavaConversions: Restore source compatibility with 2.9
| * | | Ensure implicit conversions to concurrent map are unambiguousPaolo Giarrusso2012-08-223-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even after the parent change, implicit conversions should still convert ConcurrentHashMap to concurrent.Map and not to mutable.ConcurrentMap. I'll include the comment by axel22 which prompting this change (taken from https://github.com/scala/scala/pull/1172#issuecomment-7928285) since it is highly informative and links to pull request comments might not be very stable: << Instead of just testing an implicit conversion to ConcurrentMap, the test should call ConcurrentMap methods such as putIfAbsent (which returns an Option[T]) and replace, to see if the correct Scala concurrent map trait is being resolved. The problem is that putIfAbsent already exists on juc.ConcurrentMap so instead of triggering an implicit conversion, a type mismatch error is output anyway. And we cannot test that the correct concurrent map trait is returned using methods like map, flatMap and friends, because concurrent map traits extends mutable.Map anyway. For this reason, I recommend to add this to the test: scala> val a = new java.util.concurrent.ConcurrentHashMap[String, String]() += (("", "")) a: scala.collection.concurrent.Map[String,String] = Map("" -> "") and make sure that the returned map is concurrent.Map, not mutable.ConcurrentMap (the above += is one of the few methods in collection that has the return type this.type). >>
| * | | JavaConversions: Restore source compatibility with 2.9Paolo Giarrusso2012-08-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Readd an implicit conversion which was available in 2.9, the one from `java.util.concurrent.ConcurrentMap` (`juc.ConcurrentMap`) to the (now deprecated) type `scala.collection.mutable.ConcurrentMap`. This implicit conversion can also be used to convert from `juc.ConcurrentMap` to `collection.Map` and creates an ambiguity error in test/files/run/map_java_conversions.scala. To fix this, I have given lower priority to the new conversion. Moreover, update the documentation in `JavaConversions`: mark this conversion as deprecated and mention the new conversion which replaces it, converting to `scala.collection.concurrent.Map`. I discussed this issue previously with Paul Phillips on scala-language: https://groups.google.com/d/topic/scala-language/uXKRiGXb-44/discussion
* | | | Merge pull request #1183 from jsuereth/fix/try-catch-inversionJosh Suereth2012-08-232-0/+2
|\ \ \ \ | |_|/ / |/| | | Fix stupid logic inversion of try-catch
| * | | Fix stupid logic inversion of try-catchJosh Suereth2012-08-212-0/+2
| | | |
* | | | Merge pull request #1167 from Blaisorblade/topic/stream-const-spaceGrzegorz Kossakowski2012-08-221-0/+44
|\ \ \ \ | |_|_|/ |/| | | Make Stream.withFilter.{map,flatMap} run in constant stack space
| * | | Also check that Stream.toSeq gives the right result.Paolo Giarrusso2012-08-221-1/+3
| | | |
| * | | Improve test for Stream.withFilter.{map,flatMap}Paolo Giarrusso2012-08-221-10/+40
| | | | | | | | | | | | | | | | Test a wider range of functionality.
| * | | Cleanup testcasePaolo Giarrusso2012-08-202-6/+2
| | | | | | | | | | | | | | | | | | | | No need to check the output - checking programmatically that the produced streams are empty is enough.
| * | | Make Stream.withFilter.{map,flatMap} run in constant stack spacePaolo Giarrusso2012-08-202-0/+16
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The included test currently fails because `map` and `flatMap` do not run in constant stack space on a stream returned by `Stream.withFilter`, as I reported here: https://groups.google.com/d/msg/scala-language/WqJR38REXnk/saaSiDdmyqoJ Fix the problem and add a simple testcase. Note that the stack space consumed when producing an element of this stream is proportional to the number of elements failing the test before the next success. The stack space consumed to produce the stream itself is the space needed to produce the first element, that is, is proportional to the number of failures before the first success.
* | | Merge pull request #1176 from scalamacros/topic/nondeterministicPaul Phillips2012-08-214-36/+2
|\ \ \ | | | | | | | | fixes non-determinism in reflection-sorted-decls
| * | | fixes non-determinism in reflection-sorted-declsEugene Burmako2012-08-214-36/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | ordering of synthetic members on java7 with a lot of cores is non-deterministic that's not a problem, because the doc doesn't promise anything about synthetics hence I've adjusted the test, so that it no longer includes accessors discussion: http://groups.google.com/group/scala-internals/msg/087a7d4805313561
* / | Fix for SI-6264, crash in checkCheckable.Paul Phillips2012-08-213-0/+11
|/ / | | | | | | | | The classic fail of assuming you will only receive a specific subclass of Type.
* | Merge pull request #1165 from jsuereth/fix/try-catch-libsJosh Suereth2012-08-202-0/+18
|\ \ | | | | | | Fix/try catch libs
| * | Adding test for try-catch library unification.Josh Suereth2012-08-202-0/+18
| |/
* / Compilespeed improvements: Exists arguments and othersMartin Odersky2012-08-201-0/+26
|/ | | | | | | | | | | | It turns out that exists is not inlinable, even if put into List. We try to eliminate or hoist most closures passed to exists in Types. There are some other small improvements as well. -- (@gkossakowski): This commit contains also a fix to crasher prepared by @paulp. I squashed that commit and kept the test-case that came with it.
* Merge pull request #1159 from scalamacros/topic/cleanupJosh Suereth2012-08-198-0/+18
|\ | | | | even more cleanup in Macros.scala
| * cleanup for macroExpandEugene Burmako2012-08-188-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | Error reporting is moved to ContextErrors to disentangle stuff in Macros.scala. With logics and error reporting intertwined it was an awful mess. Exceptions are used for the same reason. Instead of threading failures through the code polluting it with options/ifs, I outline the success path. It worked much better for typedMacroBody, but I'm also happy with the resulting code of macroExpand. To me a major factor towards applicability of exceptions was that they are short-lived and that there might be max one error per domain, after which we unconditionally bail.
* | Merge pull request #1162 from paulp/aug19-scala-graphPaul Phillips2012-08-182-0/+6
|\ \ | | | | | | Fix for community build blocker.
| * | Fix for community build blocker.Paul Phillips2012-08-182-0/+6
| |/ | | | | | | | | | | | | | | As two character bugfixes go, this was a doozy. I will forego elaborating at length and offer generic instructions for elucidation: % git log --grep=tpeHK
* / SI-5788 correct test and symbol updateVlad Ureche2012-08-191-3/+2
|/ | | | | | Previously I thought it's fixed because I didn't include the correct testcase. Now it's the correct testcase and this prompted me to change the code a bit to make it work properly.
* Merge pull request #1151 from scalamacros/topic/cleanupEugene Burmako2012-08-1718-20/+45
|\ | | | | more cleanup in Macros.scala
| * more cleanup for typedMacroBodyEugene Burmako2012-08-1714-11/+36
| |
| * shaves more than 150 lines off typedMacroBodyEugene Burmako2012-08-174-9/+9
| |
* | Fixes SI-6236.Aleksandar Prokopec2012-08-174-2/+32
| | | | | | | | | | | | | | In separate compilation runs, the static field symbol in the companion class of an object was not being recreated. Given that the singleton object was compiled separately, the static field symbol will be recreated on demand.
* | Fixes SI-6189.Aleksandar Prokopec2012-08-173-0/+60
| | | | | | | | | | | | | | | | Disable @static for the REPL code. The problem is that there are no companion classes generated for objects that contain the top-level declarations in the REPL. When there is no companion class, the selecting a @static field will translate to a getter call, instead of to a field load.
* | Merge pull request #1093 from jsuereth/fix/SI-6208-2.10.xPaul Phillips2012-08-161-0/+4
|\ \ | |/ |/| Fix SI-6208. mutable.Queue now returns mutable.Queue for collection met...
| * Fix SI-6208. mutable.Queue now returns mutable.Queue for collection methods ↵Josh Suereth2012-08-081-0/+4
| | | | | | | | rather than MutableList.
* | Merge pull request #1141 from VladUreche/issue/asmVlad Ureche2012-08-163-0/+34
|\ \ | | | | | | Fixes backend crash due to incorrect consumedTypes
| * | Fixes backend crash due to incorrect consumedTypesVlad Ureche2012-08-153-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This started out as a compiler crash after Greg copied the comprehension methods to List and made them final. The culprit was the dead code elimination phase, which after sweeping pieces of code was unable to restore the stack to its original state, thus causing the ASM backend to crash notifying the resulting bytecode is incorrect. The dead code elimination phase uses the icode Instructions' consumedTypes to determine what needs to be dropped from the stack when an instruction is eliminated, but the consumedTypes were only defined for a handful of instructions. So dce encountered a DUP instruction for which it did not have consumedTypes defined and did not restore the stack correctly. The consumedTypes/producedTypes for icode instructions are redundantly defined in 3 separate places: - Opcodes.scala (consumedTypes/producedTypes) - ICodeCheckers.scala (for checking icode) - TypeFlowAnalysis.scala (for computing types on the stack at each program point) Since the Opcodes types are the only ones visible outside, I suggest we use them in ICodeCheckers.scala and TypeFlowAnalysis.scala too. But we should make such changes after the release, as we're chilling out by the lake with a glass of good wine: SI-6234 The relevant discussion around it can be found at: https://groups.google.com/forum/?fromgroups#!topic/scala-internals/qcyTjk8euUI[1-25] Many thanks to Paul for his help! Review by @magarciaEPFL or @paulp.
* | | macroImplSigs => macroImplSigEugene Burmako2012-08-151-0/+1
| | | | | | | | | | | | | | | We no longer have multiple canonical signatures for macro implementations, so it was time to put the List-List-List-based logic to rest.
* | | cleanup of reflection- and macro-related stuffEugene Burmako2012-08-156-0/+6
|/ / | | | | | | | | | | mostly removes [Eugene] marks that I left back then and reviews related code some of those tokens got left in place, because I don't know to how fix them without imposing risks on 2.10.0
* | Add Scaladoc flag to specify hidden implicit conversionsingoem2012-08-141-1/+1
| |
* | Merge pull request #1101 from scalamacros/ticket/5940Josh Suereth2012-08-145-0/+58
|\ \ | | | | | | SI-5940 impls are no longer in macro def pickles