summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* SI-5533 Skip scaladoc packages from documentationVlad Ureche2012-07-165-33/+60
|
* Scaladoc: updated type class descriptionsVlad Ureche2012-07-164-13/+18
| | | | | | | | | | | | The known type class descriptions give you a humanly-understandable explanation for [T: TypeClass] in the implicit conversions. For example [T: Integral] will tell you that T must be an integral type such as Integer and co. Now that the reflection dust settled, I can actually add the test to make sure the well-known type classes are intercepted and explanations are given instead of the usual "the type T is context-bounded by TypeClass"
* Scaladoc: Reducing the memory footprint 2Vlad Ureche2012-07-162-1/+4
| | | | - got rid of references to WikiParser when creating EntityLinks
* Scaladoc: Reducing the memory footprintVlad Ureche2012-07-165-37/+31
| | | | | | | | | | - diagrams are not stored because they create many TypeEntities, nodes and edges -- now they are created on demand, so make sure you don't demand them twice! - eliminated the type entity cache, which was nearly useless (6s gain) but was preventing the GC from eliminating TypeEntities - an unsuccessful attempt at reducing the tons of :: garbage we're generating - there's 200MB-250MB of ::s during a typical 'ant docs.lib'
* SI-3695 SI-4224 SI-4497 SI-5079 scaladoc linksVlad Ureche2012-07-1613-104/+357
| | | | | | | | Adds the ability to link to members, classes and objects in scaladoc. The links can now be either qualified names or relative names, they both work. See the test/scaladoc/resources/links.scala for a usage example. Also introduced -no-link-warnings scaladoc flag, in case the build output gets swamped with link warnings.
* SI-4887 Link existentials in scaladocVlad Ureche2012-07-161-6/+120
| | | | | | | | | | | | | Based on an inital patch by Nada Amin. Rewrote some of the code to compress it a bit. Also fixed a problem that was affecting the prefix printing for typerefs: type parameter and existentials won't get prefixes. While I can imagine cases where you'd want to see where they come from, you can always hover over them and see their origin. Also added support for pretty-printing ThisTypes, SuperTypes and SingleTypes (with links)
* Scaladoc minor fix: Typos in diagramsVlad Ureche2012-07-163-7/+7
| | | | As suggested by Heather in pull request #816.
* SI-4360 Adds prefixes to scaladocVlad Ureche2012-07-1611-200/+303
| | | | | | | | | | | | | | | | | | | | | | | | | | This was a long-standing issue in scaladoc: It was unable to disambiguate between entries with the same name. One example is: immutable.Seq: trait Seq[+A] extends Iterable[A] with Seq[A] ... What's that? Seq extends Seq? No, immutable.Seq extends collection.Seq, but scaladoc was unable to show that. Now it does, depending on the template you're in. Prefixes are relative and can go back: -scala.collection.Seq has subclasses *immutable.Seq* and *mutable.Seq* -scala.immutable.Seq extends *collection.Seq* Unfortunately the price we pay for this is high, a 20% slowdown in scaladoc. This is why there is a new flag called -no-prefixes that disables the prefixes in front of types. Btw, it also fixes the notorious "booleanValue: This member is added by an implicit conversion from Boolean to Boolean ...". That's now java.lang.Boolean, so it becomes clear. Conflicts: src/compiler/scala/tools/nsc/doc/model/diagram/DiagramFactory.scala
* Scaladoc: workaround for untypical Map usecasesVlad Ureche2012-07-161-8/+11
| | | | | | | | | | | | | | SI-3448 partial fix: This enables a workaround for the fact that Map takes two type params while $Coll takes only one. But it doesn't fix the problem though, as there's one more piece missing from the puzzle - we need to adjust the `Coll`s in {immutable, mutable, concurrent}.Map to something that makes sense for the usecase. And that's not possible. But I'm committing this nevertheless, maybe other projects can benefit from it. And for SI-3448, the solution lies in automatic usecase generation, whenever that will be ready.
* SI-4324 Scaladoc case class argument curryingVlad Ureche2012-07-161-1/+4
| | | | | case class C(i: Int)(b: Boolean) would appear uncurried in scaladoc: case class C(i: Int, b: Boolean)
* SI-5558 Package object members indexingVlad Ureche2012-07-161-1/+1
| | | | This bug was fixed by the model upgrade in c11427c1. Test case confirmation.
* Scaladoc: Inherited templates in diagramsVlad Ureche2012-07-165-24/+44
| | | | | | | | | | | | Related to SI-3314, where we started showing inherited templates that were normally not documented. This patch corrects a problem in parentTypes that was preventing inherited templates from being displayed in diagrams. Also renamed: PackageDiagram => ContentDiagram ClassDiagram => InheritanceDiagram which should have been done much earlier
* SI-3314 SI-4888 Scaladoc: Relative type prefixesVlad Ureche2012-07-1613-106/+187
| | | | | | | | | | | | And adds support for linking to class members, only usable from the model factory now, so no links to members from the doc comment yet, sorry. But it fixes the Enumeration problem once and for all! Also corrected the inTpl for members obtained by implicit conversions, so they're in the correct template and the comment variable expansion is done from the correct (but different) template. Review by @kzys.
* SI-5235 Correct usecase variable expansionVlad Ureche2012-07-166-22/+49
| | | | | | | | | | | | | The bug is related to a couple of other annoyances, also fixed: - usecases without type params were crashing scaladoc due to a change in the PolyTypes class (not allowing empty tparams list) - properly getting rid of backticks (even if the link is not valid) - correct linking for usecases with $Coll = `immutable.Seq` (the symbol searching algorithm was too of restrictive, now we search the entire ownerchain - and the empty package at the end) - give a warning if the type lookup fails - finally, added a $Coll variable to List, for some reason it wasn't there and we were getting immutable.Seq as the result of use cases.
* Merge pull request #908 from lrytz/intellijAdriaan Moors2012-07-1615-41/+107
|\ | | | | updated intellij project files
| * updated intellij project filesLukas Rytz2012-07-1615-41/+107
| |
* | Merge pull request #913 from gkossakowski/partest-instrumentedAdriaan Moors2012-07-1613-2/+306
|\ \ | | | | | | Partest: add `instrumented` test category.
| * | Partest: add `instrumented` test category.Grzegorz Kossakowski2012-07-1613-2/+306
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --- (taken from README) Tests in `instrumented/` directory are executed the same way as in `run/` but they have additional byte-code instrumentation performed for profiling. You should put your tests in `instrumented/` directory if you are interested in method call counts. Examples include tests for specialization (you want to count boxing and unboxing method calls) or high-level tests for optimizer where you are interested if methods are successfuly inlined (so they should not be called at runtime) or closures are eliminated (so no constructors of closures are called). Check `scala.tools.partest.instrumented.Instrumentation` to learn how to use the instrumentation infrastructure. The instrumentation itself is achieved by attaching a Java agent to the forked VM process that injects calls to profiler. Check `scala.tools.partest.javaagent.ProfilingAgent` for details. --- A few notes on low-level details of this change: * Partest now depends on asm library for byte-code instrumentation (`build.xml`) * Build additional jar called `scala-partest-javaagent.jar` that is used with `-javaagent:` option. (`build.xml`) * Set `-javaagent:` option for all tests in `instrumented/` directory. (`RunnerManger.scala`) * Introduce a new category of tests called `instrumented`. * Add one instrumented test to demonstrate usage and test new infrastructure itself. (`InstrumentationTest.scala`) Review by @phaller.
* | | Merge pull request #876 from adriaanm/ticket-6011bAdriaan Moors2012-07-162-142/+236
|\ \ \ | | | | | | | | SI-6011 switches: unreachability, guard-free form
| * | | SI-6011 switches: unreachability, guard-free formAdriaan Moors2012-07-162-142/+236
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A complete overhaul. The original implementation in SI-5830 (#821) was pretty buggy. [from the doc comment of `collapseGuardedCases`:] Collapse guarded cases that switch on the same constant (the last case may be unguarded). Cases with patterns A and B switch on the same constant iff for all values x that match A also match B and vice versa. (This roughly corresponds to equality on trees modulo alpha renaming and reordering of alternatives.) The rewrite only applies if some of the cases are guarded (this must be checked before invoking this method). The rewrite goes through the switch top-down and merges each case with the subsequent cases it is implied by (i.e. it matches if they match, not taking guards into account) If there are no unreachable cases, all cases can be uniquely assigned to a partition of such 'overlapping' cases, save for the default case (thus we jump to it rather than copying it several times). (The cases in a partition are implied by the principal element of the partition.) The overlapping cases are merged into one case with their guards pushed into the body as follows (with P the principal element of the overlapping patterns Pi): `{case Pi if(G_i) => B_i }*` is rewritten to `case P => {if(G_i) B_i}*` The rewrite fails (and returns Nil) when: (1) there is a subsequence of overlapping cases that has an unguarded case in the middle; only the last case of each subsequence of overlapping cases may be unguarded (this is implied by unreachability) (2) there are overlapping cases that differ (tested by `caseImpliedBy`) cases with patterns A and B are overlapping if for SOME value x, A matches x implies B matches y OR vice versa <-- note the difference with case equality defined above for example `case 'a' | 'b' =>` and `case 'b' =>` are different and overlapping (overlapping and equality disregard guards) Improved by @retronym's feedback in the following ways: - fix patternEquals (it's now quadratic, but correct) - update neg/t6011 to test the improved patternEquals - remove side-effect-in-condition ugliness - introduce isGuardedCase - docs & various code clarity Also closes SI-6048 (duplicate).
* | | Merge pull request #897 from lrytz/t5956Adriaan Moors2012-07-161-3/+5
|\ \ \ | | | | | | | | SI-5956 trigger copy generation with correct namer
| * | | SI-5956 trigger copy generation with correct namerLukas Rytz2012-07-131-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | the call to `addCopyMethod` passes `templateNamer`, which is supposed to be the namer of the case class template. with two classes of the same name, `addCopyMethod` was triggered in the wrong template.
* | | | Merge pull request #907 from lrytz/ynogenAdriaan Moors2012-07-162-3324/+3326
|\ \ \ \ | |_|/ / |/| | | With -Yno-generic-signatures, exit GenASM.getGenericSignature early
| * | | With -Yno-generic-signatures, exit GenASM.getGenericSignature earlyLukas Rytz2012-07-142-2/+4
| | | | | | | | | | | | | | | | This allows using -Yno-generic-signatures as a workaround for SI-4365.
| * | | changed line endings in GenASM from Windows to UnixLukas Rytz2012-07-141-3323/+3323
| | |/ | |/|
* | | Merge pull request #902 from paulp/topic/name-implicitsAdriaan Moors2012-07-1414-52/+69
|\ \ \ | |/ / |/| | Implicits to encourage more Name-dropping.
| * | Avoid conflict with String's apply.Paul Phillips2012-07-138-31/+31
| | | | | | | | | | | | | | | | | | This brought to light that Name extends (Int => Char), and that small convenience was not paying for itself. I updated the places taking advantage of it to use Name#charAt.
| * | Merge branch '2.10.x' into topic/name-implicitsPaul Phillips2012-07-1389-1126/+4141
| |\ \
| * | | Implicits to encourage more Name-dropping.Paul Phillips2012-07-068-21/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This creates implicits in cakes across the land from: String => TermName String => TypeName And also from: Name => NameOps[Name] // lower priority TermName => NameOps[TermName] TypeName => NameOps[TypeName] What this is all about, using "drop" as a motivating example, is that these should all work: "abc" drop 1 // "bc": String ("abc": TermName) drop 1 // "bc": TermName ("abc": TypeName) drop 1 // "bc": TypeName (("abc": TypeName): Name) drop 1 // "bc": Name But this should not: ("bc": Name) // ambiguity error This requires drop not being directly on Name; peer implicits from String => TermName and String => TypeName; implicit classes to install drop on TermName and TypeName; and a lower priority implicit class to allow ops on Names. Review by @xeno.by .
* | | | Changing to scala.concurrent.context. as namespace for the system properties ↵Viktor Klang2012-07-131-6/+5
| | | | | | | | | | | | | | | | for the global execution context
* | | | Fixing oversight in propagating the runnable into the newly created thread.Viktor Klang2012-07-131-1/+1
| | | |
* | | | Squashed critical enhancements to SIP-14: daemonizing global EC, giving EC ↵Viktor Klang2012-07-1310-132/+110
| | | | | | | | | | | | | | | | to DelayedLazyVal, removing currentExecutionContext, removing impl.Future.isFutureThrowable, implementing asExecutionContext, giving a decent fallback if ForkJoinPool cannot be created
* | | | Merge pull request #892 from xuwei-k/either-scaladocJosh Suereth2012-07-133-11/+11
|\ \ \ \ | | | | | | | | | | fix Right,Left and Either scaladoc links
| * | | | fix Right,Left and Either scaladoc linksxuwei-k2012-07-133-11/+11
| | |_|/ | |/| |
* | | | Merge pull request #870 from paulp/topic/partest-no-actorsAdriaan Moors2012-07-139-1175/+900
|\ \ \ \ | | | | | | | | | | faster partest
| * | | | Eliminated more logic.Paul Phillips2012-07-114-349/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why hand out big blocks of tests to workers. Just put them all in a queue and let the threads consume them when they can. This speeds up partest a fair bit in those not uncommon situations where one worker would end up lagging well behind the others, and drops another 150ish lines of code. Test suite time on my 8-core machine goes from 28:21 to 22:34.
| * | | | Eliminated actors from partest.Paul Phillips2012-07-117-496/+364
| | | | | | | | | | | | | | | | | | | | | | | | | The actors in partest were offering nothing but unnecessary complication and an extra dependency.
* | | | | SI-5957 enable direct parsing of nested java class classfileLukas Rytz2012-07-121-1/+8
| |/ / / |/| | | | | | | | | | | by weakening an assertion. explained in the source comment.
* | | | Merge pull request #885 from soc/scaladoc-hashsetmapAdriaan Moors2012-07-122-4/+2
|\ \ \ \ | | | | | | | | | | Fix doc about specialized subclasses of c.i.HashMap/HashSet.
| * | | | Fix doc about specialized subclasses of c.i.HashMap/HashSet.Simon Ochsenreither2012-07-112-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation was wrong and judging from the “TODO: add HashMap2, HashMap3, ...” in the source file I refrained from mentioning any specific number, so overall it has gotten a bit less precise, but hopefully more correct. Review: @heathermiller
* | | | | Further optimization of asSeenFrom.Paul Phillips2012-07-121-22/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After some more early exclusion of uninteresting arguments, asSeenFrom is now over twice as fast. Compiling the collections, three runs: -- Without these two commits: 8108775ms, 8132052ms, 8257527ms in asSeenFrom Wall clock: 0m54.202s, 0m54.877s, 0m55.925s -- With these two commits: 3568719ms, 3542860ms, 3570892ms in asSeenFrom Wall clock: 0m50.730s, 0m51.213s, 0m50.850s (Rebase of https://github.com/scala/scala/pull/835)
* | | | | Optimization in asSeenFrom.Paul Phillips2012-07-121-51/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminated about half the allocations of AsSeenFromMap by examining the arguments more closely. The impact is not what one might conclude from that statistic, because those were the cheap asSeenFrom calls - but now they are cheaper. Also, - worked in some eager vals rather than lazy ones. - changed hot-spot comparison to use eq - simplified annotationArgRewriter - elimnated separate tracking of capturedPre Statistics from compiling scala/collection/**.scala: - 4209382 calls to asSeenFrom - 1025945 maps created (instantiations of AsSeenFromMap) - 1525649 maps avoided (these were instantiations before this patch) Review by most honorable performance-san @gkossakowski . (Rebase of https://github.com/scala/scala/pull/835)
* | | | | Merge pull request #884 from dcsobral/si/6032Adriaan Moors2012-07-112-12/+76
|\ \ \ \ \ | | | | | | | | | | | | SI-6032 Enhance TaskSupport documentation.
| * | | | | SI-6032 Enhance TaskSupport documentation.Daniel C. Sobral2012-07-112-12/+76
| | |/ / / | |/| | |
* | | | | Merge pull request #877 from magarciaEPFL/fixesAdriaan Moors2012-07-111-1/+1
|\ \ \ \ \ | | | | | | | | | | | | SI-6015 assertion (in Type-flow analysis) that wasn't, valid counterexample found
| * | | | | SI-6015 assertion (in Type-flow analysis) that wasn't, valid counterexample ↵Miguel Garcia2012-07-111-1/+1
| |/ / / / | | | | | | | | | | | | | | | found
* | | | | Merge pull request #874 from adriaanm/ticket-6022Adriaan Moors2012-07-111-8/+36
|\ \ \ \ \ | | | | | | | | | | | | SI-6022 model type-test-implication better
| * | | | | SI-6022 model type-test-implication betterAdriaan Moors2012-07-111-8/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we use subtyping as a model for implication between instanceof tests i.e., when S <:< T we assume x.isInstanceOf[S] implies x.isInstanceOf[T] unfortunately this is not true in general. SI-6022 expects instanceOfTpImplies(ProductClass.tpe, AnyRefClass.tpe), but ProductClass.tpe <:< AnyRefClass.tpe does not hold because Product extends Any however, if x.isInstanceOf[Product] holds, so does x.isInstanceOf[AnyRef], and that's all we care about when modeling type tests
* | | | | | Merge pull request #878 from adriaanm/topic-polyvalclassAdriaan Moors2012-07-119-49/+128
|\ \ \ \ \ \ | | | | | | | | | | | | | | polymorphic value classes
| * | | | | | polymorphic value classesMartin Odersky2012-07-117-47/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | dropping boxing code, which turned out to be a dead end.