summaryrefslogtreecommitdiff
path: root/src/reflect
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #823 from scalamacros/topic/result-typeAdriaan Moors2012-07-061-0/+4
|\ | | | | Adds `Type.resultType` to reflection API
| * Adds `Type.resultType` to reflection APIEugene Burmako2012-07-041-0/+4
| | | | | | | | | | | | | | | | Seems to be quite an essential piece of functionality. Got requests for it from Paul back then, and now Daniel in his latest blog post has to painfully pattern match his way to resultType.
* | SI-5959 type equality now accounts for mirrorsEugene Burmako2012-07-041-2/+2
|/ | | | | | | | | | | | | | | TypeRef(ThisType(<package1>), sym, args) should always be equal to TypeRef(ThisType(<package2>), sym, args) regardless of whether package1 and package2 actually represent the same symbols of not. This goes for subtyping (<:<) and type equality (=:=). However regular equality (==) and hashconsing is unaffected as per http://groups.google.com/group/scala-internals/browse_thread/thread/4bef4e6987bb68fe This is done to account for the fact that mirrors share normal symbols, but never share package symbols. Therefore at times it will occur that the same types loaded by different mirrors appear different because of the package symbols. More details: https://issues.scala-lang.org/browse/SI-5959.
* SI-5990 u.build now correctly invokes missing symbol hooksEugene Burmako2012-07-032-12/+16
|
* Merge pull request #810 from scalamacros/pullrequest/manifests-and-ticket6005Adriaan Moors2012-07-038-62/+107
|\ | | | | two pullrequests from this morning, combined to merge changes to starrs
| * reify no longer dealiases symbols and typesEugene Burmako2012-07-022-5/+2
| | | | | | | | | | this uncovers a bug in toolboxes: https://issues.scala-lang.org/browse/SI-6007 however that bug is not critical, so it will be dealt with later
| * removes ClassTag.String and TypeTag.StringEugene Burmako2012-07-021-1/+0
| | | | | | | | | | | | | | | | | | | | TypeTag.String is removed because it's unclear whether it should point to scala.Predef.String or to java.lang.String. ClassTag.String is removed to be consistent with TypeTag.String. This requires re-bootstrapping, because Definitions.scala in locker expects classTag[String] being automatically generated, whereas starr disagrees with locker on how to generate that class tag.
| * further improves reflection printersEugene Burmako2012-07-023-50/+79
| |
| * Improves backward compatibility of manifestsEugene Burmako2012-07-023-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) type ClassManifest[T] = ClassTag[T] (solves a problem with toArray[T: ClassManifest] defined on most of the collections; if these types weren't aliases, then we won't be able to change the signature of that method to toArray[T: ClassTag], because that would break source compatibility for those who override toArray in their custom collections) 2) Compiler-generated manifests no longer trigger deprecation warnings (this is implemented by using ClassManifestFactory instead of ClassManifest and ManifestFactory instead of Manifest) 3) Deprecation messages got improved to reflect the changes that were introduced in 2.10.0-M4.
* | Merge pull request #808 from scalamacros/topic/moduleclassAdriaan Moors2012-07-031-1/+0
|\ \ | |/ |/| better module classes support in the reflection API
| * better module classes support in the reflection APIEugene Burmako2012-07-021-1/+0
| |
* | Merge pull request #802 from retronym/ticket/5489Adriaan Moors2012-07-021-17/+21
|\ \ | | | | | | SI-5489 Avoid accidentally adding members to Object in erasure.
| * | SI-5489 Avoid accidentally adding members to Object in erasure.Jason Zaugg2012-07-011-17/+21
| |/ | | | | | | | | | | | | | | | | | | | | `Symbol#classBound` assumed that `refinedType` would return a a type based on new refinement class symbol; but that isn't so during erasure. Instead, it returns the first super class, into which we entered new members. Needless to say, the next run of the resident compiler didn't take kindly to these hijinks. To remedy the situation, I've added (yet another) condition on `phase.erasedTypes`.
* / moves reflective compiler into scala.tools.reflectEugene Burmako2012-07-021-1/+1
|/
* Fixed race condition that was caused by Statistics pushTimer.Martin Odersky2012-06-281-2/+2
|
* Statistics improvements and bug fixes.Martin Odersky2012-06-254-69/+138
| | | | Added compile-time option hotEnabled to Statistics that can be used to count very high frequency methods with 0 overhead for the disabled case. Fixed problem with weak maps that caused some timers to be discarded prematurely before they could be printed. Fixed problem with accouning for stacked timers.
* adds `narrow` to the reflection APIEugene Burmako2012-06-191-2/+10
| | | | as per https://issues.scala-lang.org/browse/SI-5951
* Merge pull request #746 from adriaanm/pullreq/740-rebasedAdriaan Moors2012-06-196-172/+312
|\ | | | | Statistics reorganization
| * Statistics reorganizationMartin Odersky2012-06-196-172/+312
| | | | | | | | | | Statistics were broken since the move to reflect.internal. They are now re-organized, made more robost and modular.
* | Merge pull request #729 from scalamacros/topic/showrawAdriaan Moors2012-06-198-115/+286
|\ \ | |/ |/| improve showRaw
| * improves showRawEugene Burmako2012-06-198-115/+286
| | | | | | | | addresses concerns raised in http://groups.google.com/group/scala-user/browse_thread/thread/de5a5be2e083cf8e
* | Merge pull request #728 from scalamacros/topic/reflection-meetingJosh Suereth2012-06-181-0/+17
|\ \ | | | | | | exposes extra tests for symbols as discussed on reflection meeting
| * | exposes extra tests for symbols as discussed on reflection meetingEugene Burmako2012-06-151-0/+17
| | | | | | | | | | | | review by @odersky
* | | fixes checkinit, now it's for realEugene Burmako2012-06-182-9/+1
|/ /
* | Fix for broken forwarder.Paul Phillips2012-06-141-1/+1
| | | | | | | | | | | | | | Wow, I wonder what the upper bound is on how long I might have chased my tail before finding this. I know what the lower bound is, unfortunately. It's just that usually the answer to a mystery is not "the empty package class has magically become the root class, but only sometimes."
* | fixes a checkinit problemEugene Burmako2012-06-131-0/+2
|/
* Avoids cyclic reference error in AddInterfaces.Martin Odersky2012-06-081-1/+2
| | | | | | Compile Global or Typers twice in resident mode yielded a CyclicReference error, in phase erasure. The error was due to a cyclic call of isDerivedValue class. Checking I noted that isDerivedValue class is called very often, and mostly unneccessesarily. I tightened teh condition to not force the type of the class if it is a trait or package. This made the CyclicReference go away. Widened criterion that enables validation of derived value classes. Previous version made two neg tests slip through.
* Reduce time spent in lubsMartin Odersky2012-06-085-78/+110
| | | | | | | | | | Reduce time spent in lubs by making depth more adaptive. It now takes into account separately the depth of the lub types and the maximal depth of theior base type sequences. It cuts depth more aggressively if it is the base types instead of the types themselves that grow deep. The old truncation behavior is retained under option -Xfull-lubs Another change is that we now track depth more precisely, which should also help or at least allow better statistics. Also added statistics that measure #lubs and time spent in them.
* tests and fixes for the mirror APIEugene Burmako2012-06-083-75/+99
|
* de-duplicate isUncheckedAnnotation/isSwitchAnnotationAdriaan Moors2012-06-081-0/+6
|
* fixes some issues with reflectField brought up todayEugene Burmako2012-06-081-7/+34
|
* TypeTag => AbsTypeTag, ConcreteTypeTag => TypeTagEugene Burmako2012-06-087-42/+41
| | | | | This protects everyone from the confusion caused by stuff like this: https://issues.scala-lang.org/browse/SI-5884
* removes array tagsEugene Burmako2012-06-082-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before 2.10 we had a notion of ClassManifest that could be used to retain erasures of abstract types (type parameters, abstract type members) for being used at runtime. With the advent of ClassManifest (and its subtype Manifest) it became possible to write: def mkGenericArray[T: Manifest] = Array[T]() When compiling array instantiation, scalac would use a ClassManifest implicit parameter from scope (in this case, provided by a context bound) to remember Ts that have been passed to invoke mkGenericArray and use that information to instantiate arrays at runtime (via Java reflection). When redesigning manifests into what is now known as type tags, we decided to explore a notion of ArrayTags that would stand for abstract and pure array creators. Sure, ClassManifests were perfectly fine for this job, but they did too much - technically speaking, one doesn't necessarily need a java.lang.Class to create an array. Depending on a platform, e.g. within JavaScript runtime, one would want to use a different mechanism. As tempting as this idea was, it has also proven to be problematic. First, it created an extra abstraction inside the compiler. Along with class tags and type tags, we had a third flavor of tags - array tags. This has threaded the additional complexity though implicits and typers. Second, consequently, when redesigning tags multiple times over the course of Scala 2.10.0 development, we had to carry this extra abstraction with us, which exacerbated the overall feeling towards array tags. Finally, array tags didn't fit into the naming scheme we had for tags. Both class tags and type tags sound logical, because, they are descriptors for the things they are supposed to tag, according to their names. However array tags are the odd ones, because they don't actually tag any arrays. As funny as it might sound, the naming problem was the last straw that made us do away with the array tags. Hence this commit.
* backward compatibility bridgesEugene Burmako2012-06-082-0/+21
| | | | | More information can be found here: https://groups.google.com/group/scala-internals/msg/138efc5476751269
* Introduces scala-reflect.jarEugene Burmako2012-06-08120-0/+30111