summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* New .gitattributes file.Paul Phillips2012-09-204-0/+44
| | | | | | This should assist in keeping line endings straight. It is designed to enforce LF endings everywhere except for files specifically for windows.
* Merge branch 'pull-1352-reformatted' into 2.10.xPaul Phillips2012-09-2024-57/+258
|\ | | | | | | | | | | | | | | | | | | | | # By Martin Odersky * pull-1352-reformatted: Disabled failing build manager tests. New test case for SI-6337 New test case for closing SI-6385 Value classes: eliminated half-boxing Cleanup of OverridingPairs Fixes SI-6260
| * Disabled failing build manager tests.Martin Odersky2012-09-206-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the refined build manager computes its change sets it mixes up the types. It computes constructors of inner classes of the first compilation that point to types of the second compilation. This breaks a useful assertion in ExtensionMethods. The error you get for t4245 is java.lang.AssertionError: assertion failed: unexpected constructor erasure A#6956.this.B#20211 for class B#6963 What goes on here is that the primary constructor of inner class B#6963 points to the new version of that inner class A#6956.this.B#20211. This happens during the computation of change sets, not during normal compilation. Since it looks like the computation of change sets is broken I have disabled the tests, rather than disabling the assertion. It seems that during residential compilation, the result type of a constructor can be a different version of the enclosing class. I could not reproduce this
| * New test case for SI-6337Martin Odersky2012-09-201-0/+16
| | | | | | | | | | This test case shows that the variant in the comment of SI-6337 now compiles also.
| * New test case for closing SI-6385Martin Odersky2012-09-202-0/+20
| | | | | | | | | | The fixes for SI-6260 + elimination of hlaf-boxing also solve SI-6385
| * Value classes: eliminated half-boxingMartin Odersky2012-09-209-18/+87
| | | | | | | | | | | | | | We now apply erasure of value classes everywhere. previously, erasure was disabled in the value class itself. This led to irregegularities and bugs. See test run/valueclasses-pavlov.scala for something that led to a ClassCastException before.
| * Cleanup of OverridingPairsMartin Odersky2012-09-201-17/+22
| | | | | | | | | | Added a default value to a hashmap so that we can work with it without Option acrobatics.
| * Fixes SI-6260Martin Odersky2012-09-206-21/+112
|/ | | | | | | | Guards against bridge methods that clash with other methods. Two tests: The neg test is the original ticket. The run test tweaks things slightly so that the generated bridge method does not clash, and tests that the necessary unboxings are indeed performed at runtime.
* Merge pull request #1353 from gkossakowski/SI-6376-scalap-is-brokenGrzegorz Kossakowski2012-09-201-3/+8
|\ | | | | Fix problem with names encoding in scalap.
| * Fix problem with names encoding in scalap.Grzegorz Kossakowski2012-09-191-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The refactoring performed in 020053c321 made use of naming encoding more consisted but introduced a regression in scalap. The problem is that the old encoder that scalap had didn't escape any characters that were not included in its opcode list. `NameTransformer` performs full encoding so it also encodes dots that are being used as separators for packages. Therefore, in order to retain the old behaviour we need to split the name by dots before feeding each fragment to `NameTransformer`. Review by @paulp.
* | Merge pull request #1331 from scalamacros/ticket/5943Grzegorz Kossakowski2012-09-208-2/+42
|\ \ | | | | | | SI-5943 toolboxes now autoimport Predef and scala
| * | SI-5943 toolboxes now autoimport Predef and scalaEugene Burmako2012-09-208-2/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously tb.typeCheck used default typer, which builds upon NoContext. Changing the context to analyzer.rootContext(NoCompilationUnit, EmptyTree) fixed the missing imports problem. Unfortunately this doesn't help in cases like "math.sqrt(4.0)" because of https://issues.scala-lang.org/browse/SI-6393. But anyways I'm adding this test case to pending.
* | | Merge pull request #1338 from scalamacros/ticket/5418Grzegorz Kossakowski2012-09-206-3/+31
|\ \ \ | | | | | | | | existentially typed macro expansions now work fine
| * | | test case closes SI-5418Eugene Burmako2012-09-182-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | Now, when the existential reification bug is fixed, I've been able to take a look at SI-5418, and, apparently, the problem with importers has fixed itself during these 9 months of the bug being active.
| * | | existentially typed expansions now work fineEugene Burmako2012-09-184-3/+18
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If one tries to compile the following code with the parent of this commit: ru.reify(new Object().getClass) then the following error will occur: Test.scala:2: error: type mismatch; found : $u.Expr[Class[_ <: Object]] required: reflect.runtime.universe.Expr[Class[?0(in value <local Test>)]] where type ?0(in value <local Test>) <: Object ru.reify(new Object().getClass) ^ This happens because macro expansions are always typechecked against the return type of their macro definitions instantiated in the context of expandee. In this case the expected type contains skolems which are incompatible with wildcards in the type of the expansion. I tried all the incantations I could think of - without any success. Luckily I met Martin who pointed me at the same problem solved in adapt (see the diff w.r.t Typers.scala).
* | | Merge pull request #1358 from scalamacros/ticket/6392Grzegorz Kossakowski2012-09-205-2/+33
|\ \ \ | | | | | | | | SI-6392 wraps non-terms before typecheck/eval
| * | | SI-6392 wraps non-terms before typecheck/evalEugene Burmako2012-09-195-2/+33
| | | | | | | | | | | | | | | | | | | | Wrap non-term arguments of typecheck and eval, so that toolboxes can work with full-fledged files (except for package declarations).
* | | | Merge pull request #1354 from scalamacros/ticket/6363Eugene Burmako2012-09-1998-4073/+2924
|\ \ \ \ | | | | | | | | | | merges scala.reflect.base into scala.reflect.api
| * | | | SI-6363 deploys the updated starrEugene Burmako2012-09-199-36/+6
| | | | |
| * | | | SI-6363 removes scala.reflect.baseEugene Burmako2012-09-1988-4008/+2870
| | | | | | | | | | | | | | | | | | | | | | | | | As the experience has shown, there's no need for a separate layer of reflection in scala-library.jar. Therefore I'm putting an end to it.
| * | | | prepping for the refactoringEugene Burmako2012-09-1911-37/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reification (both tree-based and type-based) should be avoided before we release 2.10.0-final, since it impairs reflection refactorings like the upcoming one. Also the upcoming refactoring moves tag materialization anchors, and we have to add them to fast track in advance, so that they are treated as macros later.
| * | | | fixes NameTypes in base namesEugene Burmako2012-09-197-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NameType is introduced in base.StandardNames#NamesBase to abstract away the difference between term names and type names in order to encode common names such as EMPTY or WILDCARD. Flavor-specific name repositories, such as TermNames and TypeNames are supposed to override NameType fixing it to correspondingly TermName or TypeName. Unfortunately I completely overlooked this and as a result some standard names were typed with insufficient precision, e.g. This(tpnme.EMPTY) didn't work.
| * | | | SI-6390 removes Trees#ArrayValue from the APIEugene Burmako2012-09-194-55/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced by uncurry - therefore it can be seen neither by macros, nor by runtime reflection. Despite never being pickled, ArrayValue is supported by unpickler so I couldn't move it exclusively to scala-compiler.jar. Figuring out the mysterious reason for pickling ArrayValue is left to future work.
* | | | | Merge pull request #1333 from paulp/less-inlineGrzegorz Kossakowski2012-09-1923-183/+160
|\ \ \ \ \ | |_|/ / / |/| | | | Removed many @inline annotations and final modifiers.
| * | | | Removed many @inline annotations and final modifiers.Paul Phillips2012-09-1823-183/+160
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is my belief that these @inlines and finals landed between unhelpful and harmful. I am sure this will be disputed in some cases. It's too much and too difficult to measure except in the aggregate unless we have specific @inline sites to discuss. I don't know upon whom the burden of proof lies. I think we should err on the side given here, since there is no evidence of any consistent rationale being applied and it is easy to verify the negative impact scala compiler inlining can have on hotspot's far more sophisticated inlining.
* | | | Merge pull request #1204 from chuvoks/rbGrzegorz Kossakowski2012-09-192-8/+59
|\ \ \ \ | |_|_|/ |/| | | Rank based take/drop/slice
| * | | Add RedBlackTree tests for take/drop/slice.Juha Heljoranta2012-09-181-0/+42
| | | | | | | | | | | | | | | | Addresses review feedback by axel22.
| * | | Retain Ordering in drop/take/slice signatures.Juha Heljoranta2012-09-181-3/+3
| | | | | | | | | | | | | | | | Addresses code review feedback by @axel22.
| * | | Rank based take/drop/slice.Juha Heljoranta2012-08-281-11/+20
| | | | | | | | | | | | | | | | | | | | Tree navigation based on node rank is faster than using compare method. rank is simply count(tree.left) + 1.
* | | | Merge pull request #1343 from namin/dynamic-sigGrzegorz Kossakowski2012-09-195-5/+95
|\ \ \ \ | |_|_|/ |/| | | Fixes SI-6354: improved error messages for Dynamic signature mismatches.
| * | | Fixes SI-6354: improved error messages for Dynamic signature mismatches.amin2012-09-195-5/+95
| | | | | | | | | | | | | | | | | | | | | | | | If an error occurs afer a Dynamic rewriting, augment the error message with the rewritten tree and a hint to check the Dynamic method signature.
* | | | Merge pull request #1335 from cvogt/topic/reflection-scaladocEugene Burmako2012-09-1924-186/+681
|\ \ \ \ | | | | | | | | | | improved reflection documentation
| * | | | improved/fixed reflection docs based on commentsChristopher Vogt2012-09-1915-70/+155
| | | | |
| * | | | improved reflection documentationChristopher Vogt2012-09-1822-181/+591
| | | | |
* | | | | Merge pull request #1327 from scalamacros/ticket/6287Grzegorz Kossakowski2012-09-195-3/+52
|\ \ \ \ \ | |_|/ / / |/| | | | SI-6287 fixes synthetic symbol clashes in toolbox
| * | | | test case closes SI-5770Eugene Burmako2012-09-182-0/+35
| | | | |
| * | | | SI-6287 fixes synthetic symbol clashes in toolboxEugene Burmako2012-09-173-3/+17
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently synthetic classes like $anonfun$1 have two properties: 1) Their names are generated using a counter unique to a compilation unit 2) After flatten they levitate to the nearest enclosing package As a result if we use an empty package to wrap toolbox codegen, then this package will soon be overflown by $anonfun$1 symbols, because: 1) New codegen session = new compilation unit = new counter which starts at 0 2) New codegen session = new anon funs that end up as children of empty package Creating a freshly named package for each codegen session fixed the problem. Now anonfuns from different sessions end up with different parents.
* | | | Merge pull request #1341 from rkuhn/document-App-RKGrzegorz Kossakowski2012-09-181-0/+10
|\ \ \ \ | | | | | | | | | | clarify caveats of App trait
| * | | | clarify caveats of App traitRoland2012-09-181-0/+10
| | |/ / | |/| |
* | | | Merge pull request #1324 from scalamacros/ticket/6374Eugene Burmako2012-09-187-50/+25
|\ \ \ \ | | | | | | | | | | Scala reflection now supports Java CRTP
| * | | | refactors java reflection testsEugene Burmako2012-09-177-88/+16
| | | | | | | | | | | | | | | | | | | | All javac-produced artifacts are now placed into test/files/lib
| * | | | SI-6374 Reflection now works for anns with enum fieldsEugene Burmako2012-09-173-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Enum members are static and, therefore, they need to be looked up in classSymbol(<enum>).companionModule, rather than in classSymbol(<enum>).
| * | | | Reflection no longer produces faux existentialsEugene Burmako2012-09-173-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of using plain ExistentialType factory of a case class typeToScala sometimes returned existentials with empty quantifieds. Changing ExistentialType to newExistentialType, which simply returns the underlying types if params are empty, fixed the problem.
| * | | | SI-6374 Scala reflection now supports Java CRTPEugene Burmako2012-09-174-5/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Translation of Java types to Scala types has previously been existentionalizing raw types of ParameterizedType arguments. As shown in https://issues.scala-lang.org/browse/SI-6374 this leads to cyclic reference errors. If you wonder about the mechanism of the error, take a look at the comments to the aforementioned issue - there's a detailed explanation. However calling rawToExistential is completely unnecessary, because existential parameters of the results are immediately discarded, and only prefix and symbol are used later on (which means that existential extrapolation performed by rawToExistential also doesn't after the result). Finding out this was tough, but the rest was a piece of cake. Getting rid of the call to rawToExistential when translating ParameterizedType fixed the problem.
* | | | | Merge pull request #1298 from pavelpavlov/SI-5767Josh Suereth2012-09-1819-102/+284
|\ \ \ \ \ | | | | | | | | | | | | SI-5767 fix + protecting public FlatHashMap API
| * | | | | pull request feedbackPavel Pavlov2012-09-1816-28/+139
| | | | | |
| * | | | | Making public methods of FlatHashTable protectedPavel Pavlov2012-08-294-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | As discussed in https://groups.google.com/forum/?pli=1#!topic/scala-internals/1yABM30POS0
| * | | | | SI-5767 fix + small HashSet/HashMap fixesPavel Pavlov2012-08-276-72/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `LinkedHashSet` implementation moved from `FlatHashTable` to `HashTable` - `remove` time reduced from O(n) to O(1) - `diff` time reduced from O(n^2) to O(n) - A bit of refactoring in `HashTable` serialization code - Putting an element into hash map now avoids double hash code/hash index calculation (see `HashTable#findOrAddEntry`) - bugfix: compiler/LambdaLift occasionally breaks LinkedHashSet integrity
* | | | | | Merge pull request #1340 from gkossakowski/revert-static-annotationGrzegorz Kossakowski2012-09-1827-722/+36
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Revert `@static` annotation
| * | | | | Remove `@static` annotation from the library.Grzegorz Kossakowski2012-09-181-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | It's a follow-up commit on 4bfcadabae7663e4329f5a4b21a9368477a7e3e3.