summaryrefslogtreecommitdiff
path: root/src/reflect
Commit message (Collapse)AuthorAgeFilesLines
* Fix SI-6552, regression with self types.Paul Phillips2012-10-211-3/+5
| | | | | | | | | In 6eb55d4b7a we put in a remedy for an old issue SI-4560 which had accumulated a number of sketchy partial remedies which carried no tests to illustrate their necessity. Looks like at least one of those was doing something useful. Here's to reversion-reversion. This reverts commit c8bdf199, which itself reverted cb4fd6582.
* Changes Tree and Type members from vals to defs.Paul Phillips2012-10-132-115/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | Explanatory email: The reflection API defines a great many abstract vals. I would like these all to be defs. I'm sending a pull request to that end. Reasons: for starters, they should default to being defs. It's a decision to use vals for which one should have to supply reasons. The reason for THAT is that defs can be implemented with vals, but not vice versa. Why does this matter? I can't find my long writing on the subject of TypeRef. In short, we waste a huge amount of memory on its fields, because given the way TypeRef is defined, each one demands a pre, a sym, and an args. Except that somewhere between 1/3 and 1/2 have prefix "NoPrefix", and somewhere between 1/3 and 1/2 have args "Nil". We know it at creation time, but we give every typeref the whole field anyway. At present there's no way to fix this which has acceptable performance - i.e. custom subclasses save us lots of memory, but are too much slower for having to use an extractor - but there's no reason we should have to choose, and I fully expect to fix it eventually. Let's not make that fix into a breaking change by abstractly defining "pre" and "args" as field-requiring vals.
* JavaUniverseVlad Ureche2012-10-111-2/+1
|
* Moved @contentDiagram in SymbolsVlad Ureche2012-10-111-2/+2
|
* Adds lots of new documentation for TypeTags, Mirrors, Universes and moreHeather Miller2012-10-1119-342/+621
| | | | | Additionally includes improvements, formatting fixes, and link additions and fixes.
* runtime.JavaUniverse - put ungrouped members at the topVlad Ureche2012-10-112-2/+4
|
* Forgotten annotation in AnnotationsVlad Ureche2012-10-111-1/+1
|
* Diagram tweakingVlad Ureche2012-10-1113-7/+29
| | | | blocked by SI-6511
* Grouping for reflection and macrosVlad Ureche2012-10-1124-251/+1046
| | | | and warning cleanup
* fixes a typoEugene Burmako2012-10-111-1/+1
|
* scala.reflect.api.Symbols documentationVlad Ureche2012-10-111-50/+330
| | | | Oh those pretty groups, u gotta luv'em...
* Symbols docs cleanup, mostly moved to guideingoem2012-10-111-198/+32
|
* scala.reflect.api.Position documentationVlad Ureche2012-10-113-61/+50
|
* scala.reflect.api.StandardNames documentationVlad Ureche2012-10-113-11/+27
|
* scala.reflect.api.Constants documentationVlad Ureche2012-10-112-82/+124
|
* removed docs for internal TypeCreator and TreeCreatorChristopher Vogt2012-10-112-37/+5
|
* simplified reflection docs for treesChristopher Vogt2012-10-111-216/+28
|
* Rearranged some reflection docs, moving things to the guideingoem2012-10-1111-437/+86
|
* reflection docs improvements and moves to doc pageChristopher Vogt2012-10-114-234/+20
|
* docs for reflection and macrosEugene Burmako2012-10-1140-385/+3051
|
* Fix for SI-6499, regression in type inference.Paul Phillips2012-10-101-7/+29
| | | | | | | | | | | | I can't do any better than a reproduced comment: For some reason which is still a bit fuzzy, we must let Nothing through as a lower bound despite the fact that Nothing is always a lower bound. My current supposition is that the side-effecting type constraint accumulation mechanism depends on these subtype tests being performed to make forward progress when there are mutally recursive type vars. See pos/t6367 and pos/t6499 for the competing test cases.
* Merge pull request #1458 from scalamacros/pullrequest/reflectionJosh Suereth2012-10-0931-166/+117
|\ | | | | Another reflection bomb
| * removes strongly-typed Constant.value wrappersEugene Burmako2012-10-081-12/+0
| | | | | | | | These are surely not necessary. Thanks Vlad!
| * upgrades showRawEugene Burmako2012-10-041-18/+29
| | | | | | | | | | | | | | | | Fixes the stuff that was irritating, when I was preparing examples for reflection documentation. Has zero impact at stability of scalac, because showRaw isn't used anywhere in the compiler unless invoked explicitly.
| * introduces api.JavaMirrorsEugene Burmako2012-10-042-12/+17
| | | | | | | | | | | | | | | | | | This trait carries mirror-related changes of the API that happen when api.Universe transforms into api.JavaUniverse. From a coding standpoint this is a mere rehashing of the code, but from a documentation standpoint this provides additional insights into what's going on in reflection.
| * moves Attachments from api to macrosEugene Burmako2012-10-045-9/+18
| | | | | | | | | | | | Because they are only available in macros.Universe, not in api.Universe, therefore I'd argue that the confusion factor is stronger than the weirdness of scala.reflect.api.Position extending scala.reflect.macros.Attachments.
| * introduces macros.package.scalaEugene Burmako2012-10-041-0/+4
| | | | | | | | | | For the sole reason of putting docs on it in a separate pull request, which is being prepared elsewhere
| * removes extraneous methods from api.StandardNamesEugene Burmako2012-10-041-2/+0
| | | | | | | | | | nme.ROOT doesn't have much use in the public API (unlike nme.ROOTPKG). tpnme.EMPTY duplicates a method inherited from the base class.
| * removes extraneous methods from api.StandardDefinitionsEugene Burmako2012-10-041-11/+0
| | | | | | | | Never got to use these guys, so let's better remove them.
| * removes extraneous methods from api.TreesEugene Burmako2012-10-031-3/+0
| | | | | | | | Tree.hasSymbol is really too much to document for its merit.
| * hides internal methods of api.PrintersEugene Burmako2012-10-031-3/+3
| |
| * removes extraneous methods from api.MirrorsEugene Burmako2012-10-032-41/+1
| | | | | | | | | | We decided to give up on providing symbol table traversal facilities in the current incarnation of mirrors. Let's be consistent with ourselves.
| * removes extraneous methods from api.ScopesEugene Burmako2012-10-031-10/+4
| | | | | | | | It's been more than a year, and I never used these methods.
| * removes extraneous indirection from FlagValuesEugene Burmako2012-10-032-5/+1
| | | | | | | | We don't really need that abstract type.
| * removes extraneous methods from api.ConstantsEugene Burmako2012-10-031-3/+0
| | | | | | | | The next round of scaladoc-driven cleanup kicks in.
| * removes EmptyTermName and EmptyTypeNameEugene Burmako2012-10-032-10/+2
| | | | | | | | We have nme.EMPTY and tpnme.EMPTY for that.
| * renames macros.ReificationError to ReificationExceptionEugene Burmako2012-10-031-2/+10
| | | | | | | | | | And again, this is not a fatal error, so it should end with an Error, and it should subclass not Throwable, but Exception.
| * renames macros.TypeError to TypecheckExceptionEugene Burmako2012-10-031-12/+14
| | | | | | | | | | | | | | | | | | Again, this is not a fatal error, so it should end with an Error, and it should subclass not Throwable, but Exception. Also moved the exception outside the cake to simplify error handling, along the same lines of what've been done for parsing and reification exceptions.
| * renames macros.ParseError to ParseExceptionEugene Burmako2012-10-031-2/+3
| | | | | | | | Because it's not a fatal error. Neither it should subclass Throwable.
| * turns on documentation of scala.reflect.runtimeEugene Burmako2012-10-039-11/+11
| | | | | | | | | | | | | | | | We definitely need to document scala.reflect.runtime.universe, therefore adding scala.reflect.runtime to skipPackages was a mistake. But then we need to make a bunch of internal classes private to reflect or to scala. Not very pretty, but it works.
* | SI-6485 stops creating extmethods for macrosEugene Burmako2012-10-081-1/+1
| | | | | | | | | | Macros don't correspond to bytecode-level methods, therefore there's no need to undergo any transformations past typer.
* | MethodSymbol.params => MethodSymbol.paramssEugene Burmako2012-10-074-9/+8
|/ | | | | | | | This matter was discussed at scala-internals: http://groups.google.com/group/scala-internals/browse_thread/thread/6414d200cf31c357 And I am convinced with Paul's argument: consistency of the convention is very important.
* fixes a bug in a weak cache in runtime reflectionEugene Burmako2012-10-011-1/+2
| | | | | | | | | | | Entries in SynchronizedTypes.uniques could previously be garbage collected in-between a successful call to contains and an actual cache lookup. The patch could be a one-liner, but I don't want to use HOFs in this function, whose prototype is a hotspot in the compiler. Also the fix doesn't touch scalac in any way. It only applies to reflective universes that provide runtime reflection functionality.
* Merge pull request #1415 from scalamacros/is-value-typeEugene Burmako2012-09-283-8/+115
|\ | | | | a fork of isValueType and isNonValueType
| * fully initializes symbols on `typeSignature`Eugene Burmako2012-09-281-2/+2
| | | | | | | | | | | | only affects runtime reflection, because Symbol.typeSignature is only defined in the reflection API. the rest of the compiler uses Symbol.info instead.
| * Implementations of isValueType and isNonValueType.Paul Phillips2012-09-281-5/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Restrictions regarding how non-value types can be used have generally not been enforced explicitly, depending instead on the fact that the compiler wouldn't attempt to use them in strange ways like offering a method type as a type argument. Since users can now create most types from scratch, it has become important to enforce the restrictions in a more direct fashion. This was a lot harder than it probably should have been because there are so many types which go unmentioned by the specification. Hopefully a useful exercise in any case.
| * showRaw no longer crashes on NoSymbolEugene Burmako2012-09-281-1/+2
| |
* | Merge pull request #1395 from odersky/topic/valueclass-cleanupGrzegorz Kossakowski2012-09-281-1/+1
|\ \ | | | | | | Removes discrepancy between SIP 15 and compiler
| * | Removes discrepancy between SIP 15 and compilerMartin Odersky2012-09-251-1/+1
| | | | | | | | | | | | There was a discrepancy in that the compiler alternatively accepts a val parameter or an unbox method for a value class but SIP 15 does not mention the unbox method. I commented out the line in the compiler that does it.
* | | Merge pull request #1347 from soc/SI-6380Grzegorz Kossakowski2012-09-282-2/+21
|\ \ \ | |_|/ |/| | SI-6380 Add @throws[Exception]