summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | Merge pull request #3160 from retronym/ticket/7983Adriaan Moors2013-11-222-17/+43
|\ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / |/| | | | | | | | Fix implicit divergence regression
| * | | | | | | | Account for a variation of package types in Implicit Divergence.Jason Zaugg2013-11-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While debugging pos/t7983.scala, I noticed that: complexity(scala.type): 1 complexity(Int): 2 The intent of the code is that top level classes should have a complexity of one. This commit restores that for cases when we see the prefix type as a ThisType, rather than a SingleType. I can't construct a test case in which this small difference is observable in the divergence checks.
| * | | | | | | | Code reformatting in ImplicitsJason Zaugg2013-11-191-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And use List#sum, rather than a fold. No functional change.
| * | | | | | | | SI-7983 Fix regression in implicit divergence checkingJason Zaugg2013-11-192-1/+32
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As seen in Slick. Regressed in 039b1cb1a5b8. In that commit, a call to `normalize` was replaced with `dealiasWiden` as part of a broad sweeping change. However, while the latter does less than the former with regards to eta expansion ofhigher kinded type refs (the motivation of that commit), it also does more when it comes to singleton types: they are widened to the underlying type. This was widening away `SingleType(<<package a.b>>, <<package c>>)` before the special case assiging that type component a complexity of zero could kick in. In the test case, extracted from Slick, this meant that the divergence check would consider that the second type below to outrank the first in the complexity measure, and abort the implicit search. Shape[?, ? (Coffees, Coffees), ?] Shape[DivergenceTest.this.Flat, ?, Coffees, ?] After this change, the number of packages enclosing `DivergenceTest` no longer has a bearing on the complexity score of the type. Here's how the race was run before hand: complexity(<noprefix>): 0 complexity(<root>): 1 complexity(foo.type): 2 complexity(foo.bar.type): 3 complexity(foo.bar.baz.type): 4 complexity(DivergenceTest.this.type): 5 complexity(<noprefix>): 0 complexity(<root>): 1 complexity(foo.type): 2 complexity(foo.bar.type): 3 complexity(foo.bar.baz.type): 4 complexity(DivergenceTest.this.type): 5 complexity(DivergenceTest.this.Flat): 6 complexity(<noprefix>): 0 complexity(<root>): 1 complexity(scala.type): 2 complexity(Int): 3 complexity(?): 1 complexity(DivergenceTest.this.Shape2[DivergenceTest.this.Flat,Int,?]): 16 complexity(<noprefix>): 0 complexity(<root>): 1 complexity(foo.type): 2 complexity(foo.bar.type): 3 complexity(foo.bar.baz.type): 4 complexity(DivergenceTest.this.type): 5 complexity(?): 1 complexity(<noprefix>): 0 complexity(<root>): 1 complexity(scala.type): 2 complexity(<noprefix>): 0 complexity(Coffees): 1 complexity(<noprefix>): 0 complexity(<root>): 1 complexity(scala.type): 2 complexity(Int): 3 complexity((Coffees, Int)): 7 complexity(?): 1 complexity(DivergenceTest.this.Shape2[?,(Coffees, Int),?]): 15 dominates(DivergenceTest.this.Shape2[_ <: DivergenceTest.this.Flat, Int, U2], DivergenceTest.this.Shape2[_ <: Level, (Coffees, Int), U1]): true And afterwards: complexity(DivergenceTest.this.type): 1 complexity(DivergenceTest.this.type): 1 complexity(DivergenceTest.this.Flat): 2 complexity(scala.type): 1 complexity(Int): 2 complexity(?): 1 complexity(DivergenceTest.this.Shape2[DivergenceTest.this.Flat,Int,?]): 7 complexity(DivergenceTest.this.type): 1 complexity(?): 1 complexity(scala.type): 1 complexity(<noprefix>): 0 complexity(Coffees): 1 complexity(scala.type): 1 complexity(Int): 2 complexity((Coffees, Int)): 5 complexity(?): 1 complexity(DivergenceTest.this.Shape2[?,(Coffees, Int),?]): 9 dominates(DivergenceTest.this.Shape2[_ <: DivergenceTest.this.Flat, Int, U2], DivergenceTest.this.Shape2[_ <: Level, (Coffees, Int), U1]): false Notice that even in the after shot, `scala.Int` has a complexity of 2. It should be 1; this will be fixed in a separate commit.
* | | | | | | | Merge pull request #3171 from adriaanm/starr-m7Adriaan Moors2013-11-222-8/+9
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | Bump starr to M7, along with module versions.
| * | | | | | | 2.11.0-M7 starr, 1.11.1 scalacheck, bump modules.Adriaan Moors2013-11-202-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also consult `extra-repo` more liberally to make it easier to test e.g., a staged scalacheck while releasing modules.
* | | | | | | | Merge pull request #3162 from retronym/ticket/7985Jason Zaugg2013-11-223-3/+13
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-7985 Allow qualified type argument in patterns
| * | | | | | | | SI-7985 Refactor parsing of pattern type argsJason Zaugg2013-11-191-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just parse as though it is a type, and post process to add the Bind if it turns out to be a type variable.
| * | | | | | | | SI-7985 Allow projection of lower-cased prefix as pattern type argJason Zaugg2013-11-192-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per the last commit, tighten up the interpretation of a lower cased identifier meaning that we're looking at a type variable.
| * | | | | | | | SI-7985 Allow qualified type argument in patternsJason Zaugg2013-11-192-1/+4
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were considering the lower case `s` in `case _: Array[scala.Int]` as a sign that we were dealing with a type variable pattern. Now, we only do this if a lookahead confirms the absence of a the `.`
* | | | | | | | Merge pull request #3154 from huitseeker/issue/SI-7221-PRJason Zaugg2013-11-221-72/+79
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-7221 Rewrites pollForWork non-recursively
| * | | | | | | | SI-7221 rewrites pollForWork non-recursivelyFrançois Garillot2013-11-201-72/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #1001407
* | | | | | | | | Merge pull request #3134 from xeno-by/topic/is-term-macroJason Zaugg2013-11-221-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | more precise isMacroApplication check
| * | | | | | | | | more precise isMacroApplication checkEugene Burmako2013-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaces the `symbol.isMacro` check with `symbol.isTermMacro`. Doesn’t make any difference to trunk but helps a lot with macro annotations.
* | | | | | | | | | Merge pull request #3156 from JamesIry/remove_deprecated_migration_constructorJason Zaugg2013-11-221-4/+1
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Remove deprecated constructor from the migration annotation
| * | | | | | | | | | Remove deprecated constructor from the migration annotationJames Iry2013-11-181-4/+1
| | |_|/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The migration annotation had a deprecated 2 arg constructor that was deprecated in 2.10.0. This commit removes that constructor. Because migration is private to the scala package this change shouldn’t affect the rest of the community.
* | | | | | | | | | Merge pull request #3138 from densh/pr/fresh-name-extractorJason Zaugg2013-11-227-33/+96
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Refactor out fresh name prefix extraction logic
| * | | | | | | | | | use more specific cake dependenciesDen Shabalin2013-11-201-1/+1
| | | | | | | | | | |
| * | | | | | | | | | refactor out fresh name prefix extraction logicDen Shabalin2013-11-177-33/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. refactor out FreshNameExtractor out of Quasiquotes cake into SymbolTable (can’t put it outside due to the fact that names are path-dependent) 2. add optional parameter to the fresh name creator to cover additional qq$ prefix needed for quasiquotes 3. add unit tests
* | | | | | | | | | | Merge pull request #3152 from paulp/pr/deprecationsJason Zaugg2013-11-2225-657/+35
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Removing deprecated code.
| * | | | | | | | | | | Removing deprecated code.Paul Phillips2013-11-1825-657/+35
| | |/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code which has been deprecated since 2.10.0 and which allowed for straightforward removal.
* | | | | | | | | | | Merge pull request #3131 from densh/pr/deprecate-pair-and-tripleJason Zaugg2013-11-2280-462/+468
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|_|/ / |/| | | | | | | | | | Deprecate Pair and Triple
| * | | | | | | | | | deprecate Pair and TripleDen Shabalin2013-11-2080-462/+468
| |/ / / / / / / / /
* | | | | | | | | | Merge pull request #3175 from retronym/ticket/6229Eugene Burmako2013-11-224-0/+20
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | SI-6329 Graduation day for pending tests for tag materialization
| * | | | | | | | | | SI-6329 Graduation day for pending tests for tag materializationJason Zaugg2013-11-214-0/+20
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two kids in the class or '6329 had to repeat the senior year, but with a little help from 76b92ef, they've finally graduated. Here's the class photo: commit 3e855661136bb6c530ef1d3a24dc83800e7f1134 Author: Eugene Burmako <xeno.by@gmail.com> Date: Thu Sep 6 22:19:56 2012 +0200 test suite for SI-6329 test/files/run/t6329_repl.check | 13 +++++++++++++ test/files/run/t6329_repl.scala | 8 ++++++++ test/files/run/t6329_repl_bug.check | 13 +++++++++++++ test/files/run/t6329_repl_bug.pending | 10 ++++++++++ test/files/run/t6329_vanilla.check | 2 ++ test/files/run/t6329_vanilla.scala | 4 ++++ test/files/run/t6329_vanilla_bug.check | 2 ++ test/files/run/t6329_vanilla_bug.pending | 7 +++++++ 8 files changed, 59 insertions(+)
* | | | | | | | | | Merge pull request #3172 from retronym/ticket/7987Eugene Burmako2013-11-222-0/+18
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | SI-7987 Test case for "macro not expanded" error with implicits
| * | | | | | | | | | SI-7987 Test case for "macro not expanded" error with implicitsJason Zaugg2013-11-212-0/+18
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed, serendipitously, a handful of commits ago in 4a6882e772, "SI-7944 FOUND: stray undetermined type params in vicinity of implicits".
* | | | | | | | | | Merge pull request #3176 from densh/pr/deprecate-responderAdriaan Moors2013-11-211-0/+2
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | deprecate scala.Responder
| * | | | | | | | | | deprecate scala.ResponderDen Shabalin2013-11-211-0/+2
| | |_|_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed earlier it doesn’t really belong to the scala package.
* | | | | | | | | | Merge pull request #3173 from retronym/topic/classOf-type-applyGrzegorz Kossakowski2013-11-213-1/+8
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | Handle TypeApply(fun, ...) for symbol-less funs
| * | | | | | | | | Handle TypeApply(fun, ...) for symbol-less funsJason Zaugg2013-11-213-1/+8
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Such as class literals, as one could conjure in `classOf[Int][Int]` Before, this would crash with a `NullPointerException`
* | | | | | | | | Merge pull request #3170 from adriaanm/scalacheck-1.11Adriaan Moors2013-11-207-31/+9
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Prepare upgrade to scalacheck 1.11.
| * | | | | | | | | Prepare upgrade to scalacheck 1.11.Adriaan Moors2013-11-207-31/+9
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our scalacheck tests now compile against 1.10.1 and 1.11.0. They pass on 1.10.1, but fail on 1.11.0. Once (that)[https://github.com/rickynils/scalacheck/issues/79]'s fixed, and 1.11.1 released, we should be able to upgrade to it by simply changing scalacheck.version.number in versions.properties. The changes are mostly removing dead code (e.g., consolereporter business). Of interest: the type ascription for `oneOf`. I haven't quite investigated, but something seems to have changed between 1.10.1 and 1.11.0 that caused a different overload to be picked without the type ascription. Probably not a scalac bug, just a scalacheck api change.
* | | | | | | | | Merge pull request #3163 from adriaanm/merge-2.10Grzegorz Kossakowski2013-11-200-0/+0
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Merge 2.10
| * \ \ \ \ \ \ \ \ No-op merge of 2.10.x into masterAdriaan Moors2013-11-190-0/+0
| |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | |/| | | | | | | / | | | |_|_|_|_|_|/ | | |/| | | | | |
| | * | | | | | | Merge pull request #3128 from adriaanm/pax-url-aether-1.6James Iry2013-11-182-3/+6
| | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Upgrade pax-url-aether to 1.6.0.
| | | * | | | | | | Upgrade pax-url-aether to 1.6.0.Adriaan Moors2013-11-112-3/+6
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since our jenkins uses mirrors with passwords, we needed a fix for https://ops4j1.jira.com/browse/PAXURL-217 in order to run osgi.test on jenkins, now that we use maven more. We didn't hit this bug before because we were using a standard location for the maven local repository, but that causes problems with concurrent jenkins jobs accessing it. Also, upgrade STARR because Jenkins is using `skip.locker` now. See https://groups.google.com/d/msg/scala-internals/7R-Y5txP8NI/DX_JWFO2fu4J for a discussion of the problem this should fix.
* | | | | | | | | Merge pull request #3167 from skyluc/issue/unneccesary-method-7280Jason Zaugg2013-11-201-3/+0
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | SI-7280 Remove unneccesary method
| * | | | | | | | SI-7280 Remove unneccesary methodLuc Bourlier2013-11-201-3/+0
|/ / / / / / / /
* | | | | | | | Merge pull request #3153 from misfo/patch-1v2.11.0-M7James Iry2013-11-181-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix a typo in the `scala` man page
| * | | | | | | | Fix a typo in the `scala` man pageTrent Ogren2013-11-181-1/+1
| | | | | | | | |
* | | | | | | | | Merge pull request #3140 from skyluc/issue/completion-import-object-7280Jason Zaugg2013-11-1830-57/+1037
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | SI-7280 Scope completion not returning members provided by imports
| * | | | | | | | | SI-7280 Scope completion not returning members provided by importsLuc Bourlier2013-11-154-24/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates localeContext() to return the best context possible when there are none directly associated with the given position. It happens when an expression cannot be successfully typed, as no precise ContextTree covers the expression location, or if the position is not inside any expression. Adds corresponding tests
| * | | | | | | | | Adds test cases for scope completionLuc Bourlier2013-11-1512-0/+707
| | | | | | | | | |
| * | | | | | | | | Test infrastructure for scope completionJason Zaugg2013-11-1514-33/+82
| | |_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a new marker /*_*/ to trigger scope completion test. Original type completion test oracles update for the tweaked output
* | | | | | | | | Merge pull request #3136 from dotta/issue/si-7915Jason Zaugg2013-11-184-3/+34
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | SI-7915 Corrected range positions created during default args expansion
| * | | | | | | | | SI-7915 Corrected range positions created during default args expansionMirco Dotta2013-11-154-3/+34
| | |_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tree created during expansion of default arguments contained trees with the wrong type of positions. Let's discuss this with an example. Below is the tree generated for the `foo` method in the test class included in this commit. Before this commit: ``` [54:94]def foo(): [58]Unit = <70:90>{ [70:79]<artifact> val qual$1: [70]Bar = [70:79][70:79][70:79]new [74:77]Bar(); [80]<artifact> val x$1: [80]Int = [80]qual$1.bar$default$1; <70:90><70:83>qual$1.bar([80]x$1) } ``` Now: ``` [54:99]def foo(): [58]Unit = <70:95>{ <70:84><artifact> val qual$1: [70]Bar = [70:84][70:84][70:84]new [74:77]Bar(); [85]<artifact> val x$1: [85]Int = [85]qual$1.bar$default$1; <70:95>[84:88]qual$1.bar([85]x$1) } ``` Here are the list of changes: * The synthetic `qual$1` has a transparent position, instead of a range position. * The new Select tree (i.e., `qual$1.bar`) should always have a range position, because `selected` (i.e., the called method) is always visible in the source (in fact, this is the whole point of the fix, we need a range position or hyperlinking request from the Scala IDE won't work). * The Block that contains the expanded default arguments is forced to have a transparent position, as it never exist in the original source. The tricky part of the fix is the position assigned to the new Select tree, which needs to respect the range position's invariants. In the specific case, we ought to make sure that range positions don't overlap. Therefore, the position assigned to the new Select tree is computed by intersecting the original Select position (i.e., `baseFun`'s position) and the original qualifier's position (i.e., `qual`'s position). If you take a closer look at the range positions assigned in the tree after this commit, you'll notice that the range position of the `qual$1`'s rhs (i.e., [70:84]), and `qual$1.bar` (i.e., [84:88]) might seem to overlap, because the former ends where the latter begins. However, this not the case because of the range position's invariant 2, which states: > Invariant 2: in a range position, start <= point < end Hence, the above two positions aren't overlapping as far as the compiler is concerned. One additional aspect (that may look like a detail) is that we make sure to never generate a position such that its start is after its end. This is why we take the position with the smallest end point. Furthermore, calling `withStart` would turn any position in a range position, which isn't desiderable in general (and, even worse, this can lead to generation of invalid positions - bad offsets - if the computation is performed on offset positions). Hence, the position's computation is only performed when both `baseFun` and `qual` positions are range positions. Indeed, I expect this to be always the case if the compiler is started with -Yrangepos.
* | | | | | | | | Merge pull request #3119 from Ichoran/issue/5263James Iry2013-11-184-0/+1179
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | New mutable hash map with Long keys: partially solves SI-5263 and is relevant to SI-6825.
| * | | | | | | | | New AnyRefMap fixes SI-5263 to the extent practical.Rex Kerr2013-11-182-0/+542
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An open addressing hash map based on a similar scheme to mutable.LongMap. It delivers performance equivalent to Java's HashMap for pretty much all AnyRefs, plus it works nicely with Scala's collections. Revisions made sure that all return types in the public API are specified. Also switched to a leading-zeros method of calculating the initial mask (to save a few ns). Also edited out java.util comparison numbers and moved constants to companion.
| * | | | | | | | | New mutable hash map with Long keys: partially solves SI-5263 and is relevantRex Kerr2013-11-182-0/+637
| | |_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to SI-6825. The hash map is based on an open addressing scheme that provides dramatically faster (mostly due to specialization) get and contains operations than either the standard Java HashMap or any of the existing Scala hash maps. It doesn't work well above 500,000,000 elements as the arrays cannot scale past 2^30 elements. Maps are not faster in general due to the lack of specialization of Function1[Long, V]. Revisions made sure that all return types in the public API are specified. Also switched to a leading-zeros method of calculating the initial mask (to save a few ns), and used an occasionally-more-efficient version of seekEntryOrOpen. Also edited out specific performance numbers and moved constants to companion.