summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* SI-6386 typed existential type tree's original now have tpe setUladzimir Abramchuk2013-04-092-2/+15
| | | | | | | | | | | | | | | Tree reification fails for ExistentialTypeTree. The reason is that the tree passed for reification (see reifyTree at GetTrees.scala) must have not null tpe (see reifyBoundType at GenTrees.scala), which is not true in the case of ExistentialTypeTree. Why is it so? The tree passed to reifyTree was obtained in the reshape phase of reificationusing using original TypeTrees that reporesent pre- typer representation of a type. The problem is that original's tpe for ExistentialTypeTree is not set. So the solution to the issue is to create ExistentialTypeTree's original in a such way that is has actual tpe set.
* Merge pull request #2351 from vigdorchik/ticket/si-7321bPaul Phillips2013-04-051-16/+12
|\ | | | | SI-7321 Memory leak in specialize on multiple compiler runs.
| * SI-7321 Memory leak in specialize on multiple compiler runs.Eugene Vigdorchik2013-04-041-16/+12
| | | | | | | | | | | | | | | | Currently the map is declared LinkedHashMap, which doesn't align with other caching maps that are cleared on every run. Linkedness is only needed to ensure deterministic order on the generated specialized classes. The same can be accomplished by sorting generated classes a-posteriori.
* | Merge pull request #2346 from adriaanm/build-zincAdriaan Moors2013-04-041-112/+178
|\ \ | |/ |/| Make build even more regular
| * comments to address reviewer feedbackAdriaan Moors2013-04-021-5/+13
| |
| * formattingAdriaan Moors2013-04-021-13/+13
| |
| * Preliminary support for zinc.Adriaan Moors2013-04-021-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | To use Zinc with the ant build: - install zinc and symlink the installed zinc script to ${basedir}/tools/zinc (${basedir} is where build.xml and the rest of your checkout resides) - make sure to set ZINC_OPTS to match ANT_OPTS! - invoke ant as `ant -Dstarr.version="2.10.1" -Dlocker.skip=1` (zinc does not work if locker is only classfiles, needs jars TODO rework the build to pack locker and build using that when using zinc?) Mostly to enable dog fooding of incremental compilation work for now.
| * Regularity for build.xml: 1 output dir / projectAdriaan Moors2013-04-021-90/+89
| | | | | | | | | | | | | | Untangle actors, msil builds from library/compiler builds. For further regularity, always build java files. TODO: update IDE projects
| * get rid of args element in staged-scalacAdriaan Moors2013-04-011-18/+10
| |
* | Merge pull request #2298 from retronym/ticket/6900-3Paul Phillips2013-04-039-90/+222
|\ \ | | | | | | SI-6900 Tail call elimination + dependent method type crasher
| * | SI-6900 Fix tailrec for dependent method typesJason Zaugg2013-04-022-2/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uncurry's info transformer could generate a MethodType with cloned parameter symbols. This type was used for the LabelDef generated in the TailCalls phase. But, the RHS of the method still contains types that refer to the original parmameter symbol. Spurious type errors ensued. I've spent a good chunk of time pursuing a more principled fix, in which we keep the symbols in the tree in sync with those in the MethodType. You can relive the procession of false dawns: https://github.com/scala/scala/pull/2248 Ultimately that scheme was derailed by a mismatch between the type parameter `T` and the skolem `T&` in the example below. trait Endo[A] { def apply(a: => A): A } class Test { def foo[T] = new Endo[(T, Unit)] { def apply(v1: => (T, Unit)) = v1 // no bridge created } } Interestingly, by removing the caching in SingleType, I got past that problem. But I didn't characterize it further. This commit sets asides the noble goal of operating in the world of types, and sledgehammers past the crash by casting the arguments to and the result of the label jump generated in TailCalls.
| * | Simplify interplay between Uncurry Info- and Tree-TransformersJason Zaugg2013-04-022-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now, the InfoTransformer is responsible for erasing the path dependent types of formal parameters, at the same place where it flattens nested method types. This is preferable to having the tree transformer overwrite the result of the info transformer, as used to be the case after my previous work on SI-6135 / 493197fc.
| * | Refactor existential related code out of types.Jason Zaugg2013-04-024-69/+150
| | | | | | | | | | | | | | | | | | | | | For imminent reuse in the subsequent commit. The binary compatibility whitelist is updated to ignore these, as they live in reflect.internal.
| * | Add a cautionary comment to TreeSymSubstitutor.Jason Zaugg2013-04-021-0/+5
| | |
* | | Merge pull request #2331 from paulp/pr/iterator-pathologyGrzegorz Kossakowski2013-04-031-5/+15
|\ \ \ | | | | | | | | Take the N^2 out of the compiler's TreeSet.
| * | | Take the N^2 out of the compiler's TreeSet.Paul Phillips2013-04-031-5/+15
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code responsible for this performance bug lives on somewhere in the combination of Iterator.single and Iterator.++ and is tracked by SI-7316. What this commit does is bypass the creation and composition of iterators entirely in favor of applying foreach to walking the tree. The important lesson of a bug like this: the occurrence depends on the existence of multiple implementations of basic structures like Trees. For each redundant implementation, scrutiny and testing are divided and "bug diversity" is increased. We should labor hard to structure collections in such a way that people have no good reason not to take advantage of the basic and hopefully battle-tested logic - especially when those people are us. I hope to remove util.TreeSet entirely. Until then, here is the impact of this commit on the time to compile a piece of generated test code. % time scalac3 ./target/generated/src.scala Mar 28 13:20:31 [running phase parser on src.scala] ... Mar 28 13:21:28 [running phase lazyvals on src.scala] Mar 28 13:21:28 [running phase lambdalift on src.scala] <-- WHOA Mar 28 13:25:05 [running phase constructors on src.scala] ... Mar 28 13:25:19 [running phase jvm on icode] 316.387 real, 438.182 user, 8.163 sys To this: 97.927 real, 211.015 user, 8.043 sys % time pscalac ./target/generated/src.scala Mar 28 13:18:47 [running phase parser on src.scala] ... Mar 28 13:19:44 [running phase lazyvals on src.scala] Mar 28 13:19:44 [running phase lambdalift on src.scala] Mar 28 13:19:46 [running phase constructors on src.scala] ... Mar 28 13:19:57 [running phase jvm on icode] 99.909 real, 223.605 user, 7.847 sys That's lambdalift dropping from 217 seconds to 2 seconds.
* | | Merge pull request #2344 from retronym/ticket/7147Jason Zaugg2013-04-031-2/+9
|\ \ \ | |/ / |/| | SI-7147 Diagnostic for unexplained assertion in presentation compiler.
| * | SI-7147 Diagnostic for unexplained assertion in presentation compiler.Jason Zaugg2013-04-021-2/+9
| |/ | | | | | | | | We don't have a reproducible test for this, so the best we can do is beef up the assertion to shine a little light on the problem.
* | Merge pull request #2319 from retronym/ticket/6793Paul Phillips2013-04-024-2/+40
|\ \ | | | | | | SI-6793 Don't use super param accessors if inaccessible.
| * | SI-6793 Don't use super param accessors if inaccessible.Jason Zaugg2013-03-264-2/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Alias replacement" has been with us since 2005 (13c59adf9). Given: package a { class C1(val v0: String) class C2(v1: String) extends a.C1(v1) { v1 } } The reference to `v1` is rewritten as `C2.super.v0()`, and no field is generated in `C2`. (Oddly, this optimization doesn't seem to kick in if these classes are in the empty package. That's probably a distinct bug.) However, this rewriting is done without consideration of the accessibility of `v0` from `C2`. This commit disables this optimization if there if `v0` is not accessible.
* | | Merge pull request #2281 from kzys/jira-6715Paul Phillips2013-04-024-7/+41
|\ \ \ | | | | | | | | SI-6715 Scaladoc: Use an encoded name if a decoded name is ""
| * | | SI-6715 Shouldn't return "" from TermNames.originalNameKato Kazuyoshi2013-04-034-1/+32
| | | |
| * | | Backport #2289's TermNames.unexpandedName as TermNames.originalNameKato Kazuyoshi2013-04-031-7/+10
|/ / / | | | | | | | | | | | | Because this implementation is more clear than 2.10.x's and it will simplify a further commit to fix SI-6715.
* | | Merge pull request #2303 from starblood/gyuhang/libdocAdriaan Moors2013-04-021-1/+1
|\ \ \ | |_|/ |/| | Correct sorting example for Ordering in scaladoc
| * | Correct sorting example for Ordering in scaladocGyuhang Shim2013-03-251-1/+1
| |/ | | | | | | | | | | | | | | Below code snippet, Sorting.quickSort(pairs)(Ordering.by[(String, Int, Int), Int](_._2) should be Sorting.quickSort(pairs)(Ordering.by[(String, Int, Int), Int](_._2))
* | Merge pull request #2321 from kzys/js-deferAdriaan Moors2013-04-013-23/+30
|\ \ | | | | | | Scaladoc: Load scripts at the bottom, and with a defer attribute
| * | Scaladoc: Load scripts at the bottom, and with a defer attributeKato Kazuyoshi2013-03-273-23/+30
| | | | | | | | | | | | | | | | | | | | | To improve latency on modern browsers (which supports defer) and old browsers: * https://www.webkit.org/blog/1395/running-scripts-in-webkit/ * http://developer.yahoo.com/blogs/ydn/posts/2007/07/high_performanc_5/
* | | Merge pull request #2330 from adriaanm/partest-difftoolsGrzegorz Kossakowski2013-03-3110-2019/+637
|\ \ \ | | | | | | | | Use java-diff-utils for diffing in partest.
| * | | Strip version suffix from diffutils.Adriaan Moors2013-03-293-11/+13
| | | |
| * | | Use java-diff-utils for diffing in partest.Adriaan Moors2013-03-2910-2018/+634
|/ / / | | | | | | | | | | | | | | | | | | | | | We now use the unified diff format, hence the updated check files. It's not clear to me how partest's classpath is managed, but the approach in this commit works for the ant task and script invocation. The diffutils jar is injected in the parent classloader.
* | | Merge pull request #2314 from adriaanm/build-fixesGrzegorz Kossakowski2013-03-292-335/+222
|\ \ \ | | | | | | | | further tweaks to the ant build
| * | | Clean up pack targets. Better dependency tracking.Adriaan Moors2013-03-271-89/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Target pack.@{project} is considered up to date iff classes emitted by quick.@{project} are. TODO: encapsulate "classes emitted by quick.@{project}". For now, they are duplicated as references to `${build-@{stage}.dir}/classes/@{destproject}` (in staged-scalac and *.build.path)
| * | | ant clean only zaps the quick stageAdriaan Moors2013-03-271-2/+2
| | | |
| * | | Run test.scaladoc before test.suite. Fail fast.Adriaan Moors2013-03-271-1/+1
| | | |
| * | | Let continuations library sources determine docs.lib's actualityAdriaan Moors2013-03-261-0/+1
| | | |
| * | | Preparation for faster PR validationAdriaan Moors2013-03-262-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added starr.number, so that `ant -propertyfile starr.number -Dlocker.skip=1` works across branches. Introduced target `test.core`, which skips `test.stability`, since that requires `locker == quick`, whereas `locker == starr` with the above settings. (It's interesting to see for which files it fails when that assumption is broken.) Stability will still be tested on a nightly basis. It's rarely broken.
| * | | Remove duplication in java builds of fjbg/asm/forkjoinAdriaan Moors2013-03-261-66/+31
| | | |
| * | | Formatting. Introduce {asm,forkjoin,fjbg}-classes props.Adriaan Moors2013-03-251-74/+79
| | | |
| * | | remove unused ant targets: test.ant, test.classload, test.positionsAdriaan Moors2013-03-251-100/+0
| | | |
| * | | run test.bc as part of tests on 2.10.xAdriaan Moors2013-03-251-7/+10
| | | | | | | | | | | | | | | | also added test.bc-opt target as binary compatibility differs between (non)optimized builds...
| * | | restored dependency of pack.done on quick.binAdriaan Moors2013-03-251-1/+2
| |/ /
* | | Merge pull request #2292 from retronym/ticket/7285Adriaan Moors2013-03-279-7/+170
|\ \ \ | | | | | | | | SI-7285 Fix match analysis with nested objects
| * | | SI-7285 Fix match analysis with nested objects.Jason Zaugg2013-03-238-8/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix for SI-6146 introduced `nestedMemberType` to enumerate sealed subtypes based on the (prefixed) type of the scrutinee and the symbols of its sealed subclasses. That method needed to widen `ThisType(modSym)`s to `ModuleTypeRef(modSym)` before calling `asSeenFrom`. However, this could lead to confused in the match analysis, which sees `ModuleTypeRef` as distinct from singleton types on the same modules (after all, they aren't =:=). Spurious warnings ensued. This commit makes two changes: - conditionally re-narrow the result of `asSeenFrom` in `nestedMemberType`. - present `a.b.SomeModule.type` as `SomeModule` in warnings emitted by the pattern matcher.
| * | | Expand test for SI-6124 to demonstrate cause of SI-7285.Jason Zaugg2013-03-232-3/+14
| | | |
* | | | Merge pull request #2291 from retronym/ticket/7290Adriaan Moors2013-03-275-5/+45
|\ \ \ \ | | | | | | | | | | SI-7290 Discard duplicates in switchable alternative patterns.
| * | | | SI-7290 Minor cleanups driven by review comments.Jason Zaugg2013-03-272-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - make a def a val, we only need to compute it once - add a clarifying comment - only report the first duplicate
| * | | | SI-7290 Discard duplicates in switchable alternative patterns.Jason Zaugg2013-03-235-3/+43
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pattern matcher must not allow duplicates to hit the backend when generating switches. It already eliminates then if they appear on different cases (with an unreachability warning.) This commit does the same for duplicated literal patterns in an alternative pattern: discard and warn.
* | | | Merge pull request #2288 from paulp/pr/2273-with-editsPaul Phillips2013-03-273-11/+41
|\ \ \ \ | |_|/ / |/| | | SI-6387 Clones accessor before name expansion
| * | | SI-6387 Clones accessor before name expansionEugene Vigdorchik2013-03-253-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a symbol's name is expanded due to a conflict during composition (e.g. multiple traits with same-named members, but which are not both visible at the language level in the concrete class) the compiler renames some symbols with expanded names which embed the full name of the declaring class to avoid clashes. In the rare cases when the accessor overrides the member in base class, such expansion either results in AbstractMethodError when the base method is abstract, or, even worse, can change the semantics of the program. To avoid such issues, we clone the accessor symbol, clear its ACCESSOR flag and enter the symbol with an unchanged name.
* | | | Merge pull request #2252 from soc/SI-7237-2.10Paul Phillips2013-03-251-5/+2
|\ \ \ \ | | | | | | | | | | [backport] SI-7237 Always choose ForkJoinTaskSupport