summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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 #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.
| * | | | New starr that does not depend on `@static`.Grzegorz Kossakowski2012-09-186-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deployed a new starr that does not depend on `@static` annotation. The next step will be deleting `@static` from the library altogether.
| * | | | Revert "Implement @static annotation on singleton object fields."Grzegorz Kossakowski2012-09-1711-458/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 892ee3df93a10ffe24fb11b37ad7c3a9cb93d5de with exception of keeping `@static` annotation in the library so we can deploy a new starr that does not depend on it before removing it completely. Conflicts: src/compiler/scala/tools/nsc/backend/icode/GenICode.scala src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala src/compiler/scala/tools/nsc/transform/CleanUp.scala
| * | | | Revert "WIP add private/lazy checks and a few tests."Grzegorz Kossakowski2012-09-174-73/+1
| | | | | | | | | | | | | | | | | | | | This reverts commit 227239018b38ab7218ee6b30493c9c8e1836c8c9.
| * | | | Revert "Fixes SI-6189."Grzegorz Kossakowski2012-09-175-68/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5a8dfad583b825158cf0abdae5d73a4a7f8cd997. Conflicts: src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
| * | | | Revert "Fixes SI-6236."Grzegorz Kossakowski2012-09-176-46/+5
| | | | | | | | | | | | | | | | | | | | This reverts commit faa114e2fb6003031efa2cdd56a32a3c44aa71fb.
| * | | | Revert "Fix SI-4581."Grzegorz Kossakowski2012-09-176-50/+6
| | | | | | | | | | | | | | | | | | | | This reverts commit 373f22a2022519ab894c1ea77460e6460d7c2ee4.
| * | | | Revert "Fix SI-6294."Grzegorz Kossakowski2012-09-172-19/+3
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cb393fcbe35d0a871f23189d791b44be1b826ed2. Conflicts: src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
* | | | Merge pull request #1329 from scalamacros/ticket/5692Eugene Burmako2012-09-189-1/+33
|\ \ \ \ | | | | | | | | | | SI-5692 better error message
| * | | | SI-5692 better error messageEugene Burmako2012-09-189-1/+33
| |/ / / | | | | | | | | | | | | | | | | | | | | Doesn't fix the underlying issue with macros and type inference, but at least now the error message says exactly what needs to be done to make the error go away.
* | | | Merge pull request #1328 from scalamacros/ticket/5942Grzegorz Kossakowski2012-09-183-0/+20
|\ \ \ \ | |/ / / |/| | | SI-5942 toolboxes now reset front ends
| * | | SI-5942 toolboxes now reset front endsEugene Burmako2012-09-183-0/+20
|/ / / | | | | | | | | | | | | FrontEnd => Reporter proxy now correctly redirects flush and reset back to the underlying front end.
* | | Merge pull request #1321 from namin/apply-dynamic-sugarGrzegorz Kossakowski2012-09-175-6/+40
|\ \ \ | | | | | | | | Fixed SI-6353: applyDynamic with sugared applications
| * | | Fixed SI-6353: applyDynamic with sugared applicationsamin2012-09-175-6/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Accept sugared applications such as x(1) if x implements Dynamic, so x(1) gets re-written to x.apply(1). - When picking a dynamic rewrite for x.apply(1), favor applyDynamic instead of the default selectDynamic.
* | | | Merge pull request #1320 from scalamacros/topic/is-implicitPaul Phillips2012-09-173-4/+21
|\ \ \ \ | | | | | | | | | | moves isImplicit from TermSymbol to Symbol
| * | | | moves isImplicit from TermSymbol to SymbolEugene Burmako2012-09-163-4/+21
| | | | | | | | | | | | | | | | | | | | Because classes can also be implicit.
* | | | | Merge pull request #1322 from paulp/topic/emptyArrayJosh Suereth2012-09-1713-75/+16
|\ \ \ \ \ | | | | | | | | | | | | Topic/empty array
| * | | | | Revert "Added constant empty array to the companion objects."Paul Phillips2012-09-1610-73/+4
| | | | | | | | | | | | | | | | | | | | | | | | This reverts most of commit 9d84e89d2 .
| * | | | | Moved constant empty arrays into Array companion.Paul Phillips2012-09-163-2/+12
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reminds me of at least one reason I didn't put them here before: I don't feel like I can return these from calls to Array.empty, because there's no way of knowing whether anyone has been relying upon this property: scala> Array.empty[Byte] eq Array.empty[Byte] res0: Boolean = false Since that is exactly the property I need to alter. The test above is true in all the "real" collections, which is all the more reason to be concerned that someone might be using empty arrays as not-equivalent sentinels. I can still move them here, but it'd be a lot better if array creation could use them - not only def empty but def apply[T: ClassTag](xs: T*): Array[T] which probably creates millions of empty arrays where one would do in almost every case.
* | | | | Merge pull request #1318 from odersky/ticket/6336Josh Suereth2012-09-173-4/+22
|\ \ \ \ \ | | | | | | | | | | | | SI-6336 Disallows value types in structuralal refinements
| * | | | | SI-6336 Disallows value types in structuralal refinementsMartin Odersky2012-09-163-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Structural refinements already have a number of restrictions, e.g. cannot refer to type parameters of enclosing classes. We need to disallow value classes as well.
* | | | | | Merge pull request #1308 from soc/SI-4478Josh Suereth2012-09-173-15/+15
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | SI-4478 Replaces wrt with (hopefully) slightly improved wording.
| * | | | | SI-4478 Replaces wrt with (hopefully) slightly improved wording.Simon Ochsenreither2012-09-153-15/+15
| | | | | |
* | | | | | Merge pull request #1309 from paulp/210-no-relative-pathsPaul Phillips2012-09-16118-262/+238
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | More relative path elimination.
| * | | | | More relative path elimination.Paul Phillips2012-09-15118-262/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some names I missed in 55b609458fd . How one might know when one is done: mkdir scratch && cd scratch mkdir annotation beans collection compat concurrent io \ math parallel ref reflect runtime scala sys testing \ text tools util xml scalac $(find ../src/library -name '*.scala') Until recently that would fail with about a billion errors. When it compiles, that's when you're done. And that's where this commit takes us, for src/library at least.
* | | | | | Merge pull request #1310 from scalamacros/ticket/6329Eugene Burmako2012-09-168-0/+59
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | test suite for SI-6329
| * | | | | test suite for SI-6329Eugene Burmako2012-09-068-0/+59
| | | | | |
* | | | | | Merge pull request #1319 from paulp/eugene-pullreq-1306Paul Phillips2012-09-162-1/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | Eugene pullreq 1306