summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/api/TreeCreator.scala
Commit message (Collapse)AuthorAgeFilesLines
* SI-5919 TypeTags and Exprs should be serializablePhilipp Haller2014-07-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make TypeCreator and TreeCreator extend Serializable. - When replacing a SerializedTypeTag with a TypeTag or WeakTypeTag, do not use scala.reflect.runtime.universe.rootMirror, since it is unlikely to find user classes; instead, create a runtime mirror using the context ClassLoader of the current thread. Use the same logic for SerializedExpr. - Remove writeObject/readObject methods from SerializedTypeTag and SerializedExpr since they are unused. - Add @throws annotation on writeReplace and readResolve methods. - Handle SecurityException if the current thread cannot access the context ClassLoader. - To make type tags of primitive value classes serializable, make PredefTypeCreator a top-level class. Otherwise, it would retain a reference to the enclosing Universe, rendering the TypeCreator non-serializable. Binary compatibility: - Keep nested PredefTypeCreator class to avoid backward binary incompatible change. - Keep `var` modifiers on the class parameters of SerializedTypeTag for backward binary compatibility. - Adds filter rules to forward binary compatibility whitelist: - `TypeCreator`, `PredefTypeCreator`, and `TreeCreator` must now extend from `Serializable`. - Must have new class `scala.reflect.api.PredefTypeCreator` to avoid problematic outer reference.
* Absolutized paths involving the scala package.Paul Phillips2013-05-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Confusing, now-it-happens now-it-doesn't mysteries lurk in the darkness. When scala packages are declared like this: package scala.collection.mutable Then paths relative to scala can easily be broken via the unlucky presence of an empty (or nonempty) directory. Example: // a.scala package scala.foo class Bar { new util.Random } % scalac ./a.scala % mkdir util % scalac ./a.scala ./a.scala:4: error: type Random is not a member of package util new util.Random ^ one error found There are two ways to play defense against this: - don't use relative paths; okay sometimes, less so others - don't "opt out" of the scala package This commit mostly pursues the latter, with occasional doses of the former. I created a scratch directory containing these empty directories: actors annotation ant api asm beans cmd collection compat concurrent control convert docutil dtd duration event factory forkjoin generic hashing immutable impl include internal io logging macros man1 matching math meta model mutable nsc parallel parsing partest persistent process pull ref reflect reify remote runtime scalap scheduler script swing sys text threadpool tools transform unchecked util xml I stopped when I could compile the main src directories even with all those empties on my classpath.
* SI-6132 Revisited, cleaned-up, links fixed, spelling errors fixed, rewordingsHeather Miller2012-11-021-0/+2
|
* Adds lots of new documentation for TypeTags, Mirrors, Universes and moreHeather Miller2012-10-111-1/+1
| | | | | Additionally includes improvements, formatting fixes, and link additions and fixes.
* removed docs for internal TypeCreator and TreeCreatorChristopher Vogt2012-10-111-18/+2
|
* MirrorOf => MirrorEugene Burmako2012-09-271-1/+1
| | | | | The name looks weird in the scaladoc overview panel, so I decided to do a last-minute rename.
* SI-6363 removes scala.reflect.baseEugene Burmako2012-09-191-0/+26
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.