summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused imports and other minor cleanupsSimon Ochsenreither2015-12-181-1/+1
| | | | | | | | | | - Language imports are preceding other imports - Deleted empty file: InlineErasure - Removed some unused private[parallel] methods in scala/collection/parallel/package.scala This removes hundreds of warnings when compiling with "-Xlint -Ywarn-dead-code -Ywarn-unused -Ywarn-unused-import".
* Merge pull request #4729 from retronym/topic-trait-defaults-moduleLukas Rytz2015-12-186-4/+57
|\ | | | | Desugar module var and accessor in refchecks/lazyvals
| * Desugar module var and accessor in refchecks/lazyvalsJason Zaugg2015-10-086-4/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than leaving it until mixin. The broader motivation is to simplify the mixin phase of the compiler before we get rid of implementatation classes in favour of using JDK8 default interface methods. The current code in mixin is used for both lazy val and modules, and puts the "slow path" code that uses the monitor into a dedicated method (`moduleName$lzyCompute`). I tracked this back to a3d4d17b77. I can't tell from that commit whether the performance sensititivity was related to modules or lazy vals, from the commit message I'd say the latter. As the initialization code for a module is just a constructor call, rather than an arbitraryly large chunk of code for a lazy initializer, this commit opts to inline the `lzycompute` method. During refchecks, mixin module accessors are added to classes, so that mixed in and defined modules are translated uniformly. Trait owned modules get an accessor method with an empty body (that shares the module symbol), but no module var. Defer synthesis of the double checked locking idiom to the lazyvals phase, which gets us a step closer to a unified translation of modules and lazy vals. I had to change the `atOwner` methods to to avoid using the non-existent module class of a module accessor method as the current owner. This fixes a latent bug. Without this change, retypechecking of the module accessor method during erasure crashes with an accessibility error selecting the module var. In the process, I've tweaked a tree generation utility method to wvoid synthesizing redundant blocks in module desugaring.
* | Merge pull request #4265 from retronym/ticket/9110Lukas Rytz2015-12-181-0/+27
|\ \ | | | | | | SI-9110 Pattern `O.C` must check `$outer eq O` for a top level O
| * | SI-9110 Pattern `O.C` must check `$outer eq O` for a top level OJason Zaugg2015-11-261-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | The outer check was not being generated when the prefix was a top level module. The enclosed test shows that we in fact must synthesize the outer check in that case. Perhaps the bug was introduced by neglecting to consider that a module can inherit member classes.
* | | SI-9583: Update SystemProperties.empty to return a mutable.Map to fix buildersShane Delmore2015-12-101-0/+27
|/ /
* | Merge pull request #4863 from retronym/topic/leaner-patmat-codegenLukas Rytz2015-11-241-10/+4
|\ \ | | | | | | DRY-er trees in pattern matcher code gen.
| * | DRY-er trees in pattern matcher code gen.Jason Zaugg2015-11-241-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than building a cascade of if/elses, push additional conditions into a conjunction in the condition of a single if/else. This is possible when emitting conditions for the list of arguments of a pattern. Here's an example of the improvement to post-pattern matcher trees: https://gist.github.com/retronym/0d8f7126157061d72b81 While we could try to rely on the optimizer to coalesce the repeated else clauses, it seems wasteful to emit the code in that way in the first place.
* | | Merge commit '8eb1d4c' into merge-2.11-to-2.12-nov-24Lukas Rytz2015-11-2421-27/+155
|\ \ \
| * \ \ Merge pull request #4828 from retronym/topic/existential-containsLukas Rytz2015-11-163-0/+15
| |\ \ \ | | | | | | | | | | Attacking exponential complexity in TypeMaps
| | * | | Attacking exponential complexity in TypeMapsJason Zaugg2015-11-133-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't normalize existentials during the `contain`-s type map; `ExistentialType#normalize' calls contains internally and an exponential blowup ensues. - Ensure that the type map used in variance validation never returns modified types in order to avoid needless cloning of symbols. The enclosed test case still gets stuck in Uncurry, thanks to the way that `TypeMap#mapOver(List[Symbol])` recurses through the type first to check whether the type map would be an no-op or not. If not, it repeats the type map with cloned symbols. Doing the work twice at each level of recursion blows up the complexity. Removing that "fast path" allows the enclosed test to compile completely. As at this commit, it gets stuck in uncurry, which dealiases `s.List` to `s.c.i.List` within the type. Some more background on the troublesome part of `TypeMap`: http://lrytz.github.io/scala-aladdin-bugtracker/displayItem.do%3Fid=1210.html https://github.com/scala/scala/commit/f8b2b21050e7a2ca0f537ef70e3e0c8eead43abc
| * | | | Merge pull request #4839 from SethTisue/reword-dependent-type-errorSeth Tisue2015-11-141-2/+2
| |\ \ \ \ | | | | | | | | | | | | less confusing wording for a dependent method type error
| | * | | | less confusing wording for a dependent method type errorSeth Tisue2015-11-071-2/+2
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | note to reviewers: the error messages in this file are over the place about whether they're called "parameter sections", or "argument lists", or what, so there's no point in being picky about that here for context see SI-823
| * | | | Merge pull request #4809 from wpopielarski/delambdafy-multiple-outputsJason Zaugg2015-11-131-0/+73
| |\ \ \ \ | | | | | | | | | | | | Multi output problem with delambdafied compilation
| | * | | | Test addedwpopielarski2015-11-061-0/+73
| | |/ / /
| * | | | Merge pull request #4843 from SethTisue/scaladoc-little-d-pleaseJason Zaugg2015-11-139-9/+9
| |\ \ \ \ | | | | | | | | | | | | it's Scaladoc, not ScalaDoc
| | * | | | it's Scaladoc, not "ScalaDoc" or "Scala doc"Seth Tisue2015-11-129-9/+9
| | |/ / / | | | | | | | | | | | | | | | | | | | | renaming the existing ScalaDoc and ScalaDocReporter classes might break stuff, sadly, but at least we can fix the rest
| * | | | Merge pull request #4810 from ruippeixotog/fix-mutable-setlike-clearAdriaan Moors2015-11-121-0/+26
| |\ \ \ \ | | | | | | | | | | | | SI-9497 Fix SetLike#clear() default implementation
| | * | | | SI-9497 Fix SetLike#clear() default implementationRui Gonçalves2015-10-211-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | When dealing with mutable collections, it is not safe to assume iterators will remain consistent when the collection is modified mid-traversal. The bug reported in SI-9497 is very similar to SI-7269, "ConcurrentModificationException when filtering converted Java HashMap". Then, only the `retain` method was fixed. This commit fixes `clear`, which had the same problem.
| * | | | | Merge pull request #4804 from jvican/issue/9503Adriaan Moors2015-11-121-0/+1
| |\ \ \ \ \ | | |_|/ / / | |/| | | | [SI-9503] Deprecate scala.collection.immutable.PagedSeq
| | * | | | [SI-9503] Deprecate scala.collection.immutable.PagedSeqjvican2015-11-041-0/+1
| | | | | |
| * | | | | SI-4950 Test reductionSom Snytt2015-10-252-13/+18
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | A session test with extra filtering best expresses the intentions. No check file is required.
| * | | | Merge pull request #4795 from SethTisue/windows-ciLukas Rytz2015-10-213-3/+11
| |\ \ \ \ | | |/ / / | |/| | | improvements to Windows build & test situation
| | * | | add comment about Cygwin trouble to test/partestSeth Tisue2015-10-081-0/+8
| | | | |
| | * | | fix t7634 to work on CygwinSeth Tisue2015-10-082-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this was failing because the expected output was: res1: List[String] = List(shello, world.) but the actual output was: res1: List[String] = List(shello, world., Picked up _JAVA_OPTIONS: -Duser.home=y:\jenkins) but the "Picked up..." part caused partest's filters feature to ignore the entire line (it doesn't anchor matches to start of line.) This was a tough one to track down.
* | | | | SI-9363 - Add empty serializabletriggerNZ2015-11-241-0/+2
| | | | |
* | | | | Fix for SI-9363triggerNZ2015-11-241-0/+34
| |_|/ / |/| | |
* | | | Merge pull request #4822 from retronym/ticket/9178Lukas Rytz2015-11-1810-0/+55
|\ \ \ \ | | | | | | | | | | SI-9178 Don't eta expand to an Function0-like SAM expected type
| * | | | SI-9178 Test for the status quo of eta-expansion to Func0Jason Zaugg2015-11-172-0/+14
| | | | |
| * | | | SI-9178 Don't eta expand param-less method types to SAMsJason Zaugg2015-10-278-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, we can end up with a subtle source incompatibility with the pre-SAM regime. Arguably we should phase out eta expansion to Function0 as well, but I'll leave that for another day.
* | | | | Remove ICodeSimon Ochsenreither2015-10-316-60/+13
| | | | |
* | | | | Merge pull request #4814 from soc/topic/drop-genasmLukas Rytz2015-10-2989-258/+266
|\ \ \ \ \ | | | | | | | | | | | | Remove GenASM
| * | | | | Remove GenASM, merge remaining common code snippetsSimon Ochsenreither2015-10-2789-258/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With GenBCode being the default and only supported backend for Java 8, we can get rid of GenASM. This commit also fixes/migrates/moves to pending/deletes tests which depended on GenASM before.
* | | | | | Merge pull request #4808 from retronym/ticket/9527Seth Tisue2015-10-274-0/+28
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-9527 Fix NPE in ambiguous implicit error generation
| * | | | | | SI-9527 Fix NPE in ambiguous implicit error generationJason Zaugg2015-10-214-0/+28
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In #4673, an annotation was added to allow customization of the compiler error for ambigous implicits. This change had incorrect assumptions about the shape of trees that would be generated during implicit search, and failed to account for the results of eta expanded methods when searching for a function type. This commit: - Uses the symbol from `ImpilcitInfo`, rather than calling `Tree#symbol` which is fraught with the danger of returning a null symbol for something other than an application. - Adds a test for customized messages for a polymorphic, eta expanded method, and generalizes `treeTypeArgs` to handle the implicit tree of shape `{ (x: X) => f[A](x)}`.
* | | | | | Merge pull request #4794 from densh/topic/predef-autoboxingSeth Tisue2015-10-271-0/+35
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Fixes an inconsistency between BoxesRunTime and Predef's autoboxing
| * | | | | Fixes an inconsistency between BoxesRunTime and Predef's autoboxingDenys Shabalin2015-10-081-0/+35
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously autoboxing implicits in Predef were inconsistent with BoxesRunTime box/unbox due to different treatment of unboxing of nulls. Implicits didn't check for null and would crash with NPE unlike the BoxesRunTime which correctly returned zero value of given type. The fix is trivial: lets just use asInstanceOfs to implement implicits in Predef. This would ensure that both have the same behaviour and that the two would not diverge again in the future.
* | | | | Merge pull request #4820 from lrytz/t9535Lukas Rytz2015-10-273-0/+36
|\ \ \ \ \ | |_|/ / / |/| | | | SI-9535 correct bytecode and generic signatures for @throws[TypeParam]
| * | | | SI-9535 correct bytecode and generic signatures for @throws[TypeParam]Lukas Rytz2015-10-263-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For @throws[E] where E is not a class type, GenASM incorrectly writes the non-class type to the classfile. GenBCode used to crash before this commit. Now GenBCode correctly emits the erased type (like javac) and adds a generic signature.
* | | | | Merge pull request #4815 from som-snytt/test/stringcontext-fJason Zaugg2015-10-273-193/+160
|\ \ \ \ \ | | | | | | | | | | | | f interp test is junit
| * | | | | f interp test is junitSom Snytt2015-10-253-193/+160
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moves test/files/run/stringinterpolation_macro-run.scala to the junit test class test/junit/scala/StringContextTest.scala. Adds a couple of assertions to the test.
* | | | | Merge pull request #4807 from lrytz/opt/innerClassAttrLukas Rytz2015-10-262-4/+4
|\ \ \ \ \ | |/ / / / |/| | | | Simplify and correctify calculation of the InnerClass attribute
| * | | | Simplify and correctify calculation of the InnerClass attributeLukas Rytz2015-10-202-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The InnerClass attribute needs to contain an entry for every nested class that is defined or referenced in a class. Details are in a doc comment in BTypes.scala. Instead of collecting ClassBTypes of nested classes into a hash map during code generation, traverse the class before writing it out to disk. The previous approach was incorrect as soon as the generated bytecode was modified by the optimzier (DCE, inlining). Fixes https://github.com/scala/scala-dev/issues/21.
* | | | | Merge pull request #4802 from SethTisue/merge-2.11-to-2.12-oct-16Lukas Rytz2015-10-213-0/+88
|\ \ \ \ \ | |/ / / / |/| | | | merge 2.11 to 2.12 Oct 16
| * | | | merge 2.11.x onto 2.12.x, Oct 16 2015Seth Tisue2015-10-163-0/+88
| |\ \ \ \ | | |/ / / | |/| / / | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there were merge conflicts in the Eclipse config that I resolved with --ours. I invite @performantdata to submit a followup PR bringing the Eclipse stuff into a good state on 2.12.x. there was a test failure in test/junit/scala/collection/mutable/OpenHashMapTest.scala due to the 2.12 compiler emitting the field backing a private var differently (with an unmangled name). Lukas says the difference is expected, so I just updated the code in the test. there were no other merge conflicts. % git log --decorate --oneline -1 origin/2.11.x | cat ae5f0de (origin/HEAD, origin/2.11.x) Merge pull request #4791 from performantdata/issue/9508 % git log --decorate --oneline -1 origin/2.12.x | cat c99e53e (HEAD -> 2.12.x, origin/2.12.x) Merge pull request #4797 from lrytz/M3-versions % export MB=$(git merge-base 2.12.x origin/2.11.x) % echo $MB 42cafa21f3c4a08c6dd34608278f810b6ec2886f % git log --graph --oneline --decorate $MB...origin/2.11.x | cat * ae5f0de (origin/HEAD, origin/2.11.x) Merge pull request #4791 from performantdata/issue/9508 |\ | * 08dca37 (origin/pull/4791) SI-9508 fix classpaths in Eclipse configuration * | fe76232 Merge pull request #4798 from performantdata/issue/9513 |\ \ | * | 9c97a7f (origin/pull/4798) Suppress unneeded import. | * | 30d704d Document some OpenHashMap internal methods. | * | 1fb32fc SI-9513 decrement "deleted" count in OpenHashMap.put() when slot reused | |/ * | 14f875c Merge pull request #4788 from dk14/patch-1 |\ \ | * | 42acd55 (origin/pull/4788) explicitly specify insertion-order feature in docs | / * | 68ce049 Merge pull request #4771 from som-snytt/issue/9492-here |\ \ | * | f290962 (origin/pull/4771) SI-9492 Line trimming paste | * | bc3589d SI-9492 REPL paste here doc | / * | 9834fc8 Merge pull request #4610 from todesking/spec-implicits-remove-obsolete |\ \ | * | 46009b1 (origin/pull/4610) Add view/context-bound parameter ordering rule | * | 6eba305 Spec: Implicit parameters with context/view bound is allowed since 2.10 | / * | d792e35 Merge pull request #4789 from janekdb/2.11.x-param-names-predicates-operations |\ \ | |/ |/| | * b19a07e (origin/pull/4789) Rename forall, exists and find predicate and operator params. |/ * 648c7a1 Merge pull request #4790 from SethTisue/issue/9501 |\ | * 40d12f1 (origin/pull/4790) SI-9501 link README to Scala Hacker Guide * e0b5891 Merge pull request #4786 from performantdata/issue/9506 * 39acad8 (origin/pull/4786) SI-9506 suppress Scala IDE-generated files in the Eclipse project dirs * 74dc364 SI-9506 suppress Scala IDE-generated files in the Eclipse project dirs % git merge ae5f0de Auto-merging src/repl/scala/tools/nsc/interpreter/ILoop.scala Auto-merging src/library/scala/util/Either.scala Auto-merging src/library/scala/runtime/Tuple3Zipped.scala Auto-merging src/library/scala/runtime/Tuple2Zipped.scala Auto-merging src/library/scala/collection/parallel/ParIterableLike.scala Auto-merging src/library/scala/collection/immutable/ListMap.scala Auto-merging src/library/scala/collection/TraversableLike.scala Auto-merging src/eclipse/test-junit/.classpath CONFLICT (content): Merge conflict in src/eclipse/test-junit/.classpath Auto-merging src/eclipse/scaladoc/.classpath CONFLICT (content): Merge conflict in src/eclipse/scaladoc/.classpath Auto-merging src/eclipse/scala-compiler/.classpath Auto-merging src/eclipse/repl/.classpath CONFLICT (content): Merge conflict in src/eclipse/repl/.classpath Auto-merging src/eclipse/partest/.classpath CONFLICT (content): Merge conflict in src/eclipse/partest/.classpath Auto-merging src/eclipse/interactive/.classpath Auto-merging README.md Automatic merge failed; fix conflicts and then commit the result. % git checkout --ours src/eclipse/partest/.classpath % git checkout --ours src/eclipse/repl/.classpath % git checkout --ours src/eclipse/scaladoc/.classpath % git checkout --ours src/eclipse/test-junit/.classpath % git add -u % emacs test/junit/scala/collection/mutable/OpenHashMapTest.scala % git diff test/junit/scala/collection/mutable/OpenHashMapTest.scala | cat ... - val field = m.getClass.getDeclaredField("scala$collection$mutable$OpenHashMap$$deleted") + val field = m.getClass.getDeclaredField("deleted") ... % git add -u
| | * | Merge pull request #4798 from performantdata/issue/9513Seth Tisue2015-10-151-0/+42
| | |\ \ | | | | | | | | | | SI-9513 decrement "deleted" count in OpenHashMap.put() when slot reused
| | | * | Suppress unneeded import.Performant Data LLC2015-10-141-2/+2
| | | | |
| | | * | SI-9513 decrement "deleted" count in OpenHashMap.put() when slot reusedPerformant Data LLC2015-10-101-0/+42
| | | |/
| | * | Merge pull request #4771 from som-snytt/issue/9492-hereSeth Tisue2015-10-142-0/+46
| | |\ \ | | | |/ | | |/| SI-9492 REPL paste here doc
| | | * SI-9492 REPL paste here docSom Snytt2015-09-272-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simple here documentish syntax for REPL paste. This makes it easier to paste a block of script (as opposed to transcript). It also means you won't accidentally ctl-D out of the REPL and then out of SBT and then out of the terminal window. ``` scala> :paste < EOF // Entering paste mode (EOF to finish) class C { def c = 42 } EOF // Exiting paste mode, now interpreting. defined class C scala> new C().c res0: Int = 42 scala> :paste <| EOF // Entering paste mode (EOF to finish) |class D { def d = 42 } EOF // Exiting paste mode, now interpreting. defined class D scala> new D().d res1: Int = 42 scala> :quit ```