summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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 #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.
* | | | | Merge pull request #3135 from adriaanm/revive-xml-testsJames Iry2013-11-1815-0/+336
|\ \ \ \ \ | | | | | | | | | | | | Revived tests that once depended on xml
| * | | | | Revived tests that once depended on xmlAdriaan Moors2013-11-1415-0/+336
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | I was a bit overzealous in moving stuff over to scala-xml in 9c50dd5274 These were all compiler tests that accidentally touched on xml. I've tried to delicately decouple them so they can roam the scalac pastures as intended.
* | | | | Merge pull request #3144 from xuwei-k/foreachValues-scaladocJames Iry2013-11-182-2/+2
|\ \ \ \ \ | |_|_|_|/ |/| | | | fix IntMap#foreachValue and LongMap#foreachValue scaladoc
| * | | | fix IntMap#foreachValue and LongMap#foreachValue scaladocxuwei-k2013-11-152-2/+2
| | |_|/ | |/| |
* | | | Merge pull request #3151 from xuwei-k/future-typoAdriaan Moors2013-11-171-1/+1
|\ \ \ \ | | | | | | | | | | fix typo
| * | | | fix typoxuwei-k2013-11-181-1/+1
| | | | |
* | | | | Merge pull request #3141 from soc/SI-7961Adriaan Moors2013-11-173-17/+21
|\ \ \ \ \ | |/ / / / |/| | | | SI-7961 Fix false positive procedure warnings
| * | | | SI-7961 Fix false positive procedure warningsSimon Ochsenreither2013-11-143-17/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two issues are fixed in this commit: - `def foo: Unit` was detected as missing a return type - The warning was emitted for constructors, but `def this(...): Unit = ...` is not valid Scala syntax
* | | | | Merge pull request #3145 from dotta/issue/update-eclipse-readmeAdriaan Moors2013-11-171-1/+6
|\ \ \ \ \ | |_|/ / / |/| | | | Added information on how to launch and debug scalac inside Eclipse
| * | | | Added information on how to launch and debug scalac inside EclipseMirco Dotta2013-11-151-1/+6
|/ / / /
* | | | Merge pull request #3143 from retronym/ticket/reflection-sync-restorAdriaan Moors2013-11-143-2/+9
|\ \ \ \ | | | | | | | | | | Revert "temporarily disables run/reflection-sync-subtypes"
| * | | | Revert "temporarily disables run/reflection-sync-subtypes"Jason Zaugg2013-11-143-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 04e2dbb29830d0e511cdfa8c132a9fad91d657ed, by avoiding the ill-fated attempt to short-circuit the global reflection lock. I think we can do better performance wise, but lets at least get something correct to start with.
* | | | | Merge pull request #3139 from dotta/issue/updated-eclipse-project-filesAdriaan Moors2013-11-142-4/+4
|\ \ \ \ \ | |/ / / / |/| | | | Updated Eclipse .classpath for partest and scaladoc projects
| * | | | Updated Eclipse .classpath for partest and scaladoc projectsMirco Dotta2013-11-142-4/+4
| | | | |
* | | | | Merge pull request #3133 from adriaanm/merge-2.10Adriaan Moors2013-11-1412-11/+109
|\ \ \ \ \ | | | | | | | | | | | | Merge 2.10
| * \ \ \ \ Merge branch '2.10.x' into merge-2.10Adriaan Moors2013-11-130-0/+0
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Intermediate steps: ``` g merge -s ours e350bd2cbc 2bfe0e797c2b9c57277475c9296e36cbf868b7db g merge 25bcba59ce g merge -s ours 50c8b39ec4 g merge 075f6f260c e09a8a2b7f g merge 6045a05b83 # update check file for presentation/completion-implicit-chained g merge -s ours 2.10.x ```
| | * \ \ \ \ Merge pull request #3116 from retronym/topic/backport-character-ignoreJason Zaugg2013-11-101-0/+1
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | Add buildcharacter.properties to .gitignore.
| | | * | | | | [backport] Add buildcharacter.properties to .gitignore.Paul Phillips2013-11-101-0/+1
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit 693e55e1cb75055bb243ffca2e18b8e44e80bb8c)
| | * | | | | Merge pull request #3109 from adriaanm/faster-build-2.10Adriaan Moors2013-11-082-0/+34
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | Faster build 2.10
| | | * | | | | IDE needs swing/actors/continuationsAdriaan Moors2013-11-081-0/+5
| | | | | | | |
| | | * | | | | Allow retrieving STARR from non-standard repo for PR validationAdriaan Moors2013-11-061-0/+3
| | | | | | | |
| | | * | | | | Allow publishing only core (pr validation)Adriaan Moors2013-11-061-0/+15
| | | | | | | |
| | | * | | | | Render relevant properties to buildcharacter.propertiesAdriaan Moors2013-11-061-0/+11
| | | | | | | |
| | * | | | | | Merge pull request #3110 from xeno-by/topic/7776-backportEugene Burmako2013-11-083-2/+18
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | [backport] SI-7776 post-erasure signature clashes are now macro-aware
| | | * | | | | | [backport] SI-7776 post-erasure signature clashes are now macro-awareEugene Burmako2013-11-083-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "double definition: macro this and method that have same type after erasure" This error doesn't make sense when macros are involved, because macros expand at compile-time, where we're not affected by erasure. Moreover, macros produce no bytecode, which means that we're safe from VerifyErrors.
| | * | | | | | | Merge pull request #3105 from retronym/ticket/completionGrzegorz Kossakowski2013-11-084-2/+51
| | |\ \ \ \ \ \ \ | | | |/ / / / / / | | |/| | | | | | Fix completion after application with implicit arguments
| | * | | | | | | Merge pull request #3097 from paulp/issue/6546-for-210James Iry2013-11-065-2/+25
| | |\ \ \ \ \ \ \ | | | |_|/ / / / / | | |/| | | | | | SI-6546 InnerClasses attribute refers to absent class
| | * | | | | | | Merge pull request #3102 from VladUreche/issue/4012James Iry2013-11-062-0/+22
| | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | SI-4012 Mixin and specialization work well
| * | \ \ \ \ \ \ \ Merge commit '6045a05b83' into merge-2.10Adriaan Moors2013-11-134-2/+52
| |\ \ \ \ \ \ \ \ \ | | | |_|_|/ / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/interactive/scala/tools/nsc/interactive/Global.scala
| | * | | | | | | | Fix completion after application with implicit argumentsJason Zaugg2013-11-064-2/+51
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `List(1, 2, 3).map(f).<ctrl-space>` now works; before the tree had the type `(bf: CanBuildFrom[...]):...` and did not contribute completions from the result type. This commit checks if the tree has an implicit method type, and typechecks it as a qualifier. That is enough to get to `adaptToImplicitMethod` in the type checker, infer the implicit arguments, and compute the final result type accordingly.
| | | | | | | | |
| | \ \ \ \ \ \ \
| *-. \ \ \ \ \ \ \ Merge commit '075f6f260c'; commit 'e09a8a2b7f' into merge-2.10Adriaan Moors2013-11-137-2/+47
| |\ \ \ \ \ \ \ \ \ | | | | |/ / / / / / | | | |/| / / / / / | | | |_|/ / / / / | | |/| | | | | |
| | | * | | | | | SI-4012 Mixin and specialization work wellVlad Ureche2013-11-052-0/+22
| | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | The bug was fixed along with SI-7638 in 504b5f3.
| | * / / / / / SI-6546 InnerClasses attribute refers to absent classPaul Phillips2013-11-045-2/+25
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At issue is that the optimizer would eliminate closure classes completely, then neglect to eliminate those classes from the container's InnerClasses attribute. This breaks tooling which expects those entries to correspond to real classes. The code change is essentially mgarcia's - I minimized it and put the caches in perRunCaches, and added the test case which verifies that after being compiled under -optimise, there are no inner classes. Before/after: 7,8d6 < InnerClasses: < public final #22; //class A_1$$anonfun$f$1 37,45c35,40 < #21 = Utf8 A_1$$anonfun$f$1 < #22 = Class #21 // A_1$$anonfun$f$1 < #23 = Utf8 Code --- > #21 = Utf8 Code
| | * | | | | Merge pull request #3072 from retronym/backport/7519Adriaan Moors2013-10-246-2/+54
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | [nomaster] SI-7519 Less brutal attribute resetting in adapt fallback
| | * \ \ \ \ \ Merge pull request #3053 from som-snytt/issue/6026-AFCL-findresourceJason Zaugg2013-10-233-1/+33
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | [nomaster] SI-6026 backport getResource bug fix
| | * \ \ \ \ \ \ Merge pull request #3052 from som-snytt/issue/6026-javap-loadingJason Zaugg2013-10-231-12/+16
| | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | SI-6026 REPL checks for javap before tools.jar
| * | \ \ \ \ \ \ \ Merge commit '50c8b39ec4' into merge-2.10Adriaan Moors2013-11-130-0/+0
| |\ \ \ \ \ \ \ \ \ | | | |_|_|/ / / / / | | |/| | | | | | |
| | * | | | | | | | SI-7519: Additional test case covering sbt/sbt#914Mark Harrah2013-10-233-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit e72c32db03b44d6eaf1c1872765a578c5445e15f)