summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/api
Commit message (Collapse)AuthorAgeFilesLines
* Typo and spelling correctionsJanek Bogucki2016-11-113-3/+3
|
* Avoid tree sharing with substituteThisJason Zaugg2016-05-311-3/+3
| | | | | | | | | | The underlying transformer has a by-name parameter for the to provide the `to` tree, but this was strict in the layers of API above. Tree sharing is frowned upon in general as it leads to cross talk when, e.g., the erasure typechecker mutates the `tpe` field of the shared tree in different context.
* Lower-case spelling of @deprecated messagesSimon Ochsenreither2016-05-289-144/+144
|
* Remove references to trait impl classes, mostly in doc commentsLukas Rytz2016-04-071-5/+1
|
* SD-70 Don't share footnotes across multiple calls to universe.showRawLukas Rytz2016-01-191-1/+1
| | | | | | | | | Before this commit, multiple invocations of universe.showRaw used a shared weak map that caches footnotes. If the two printed objects have equal components printed as footnotes, e.g., an equal TypeRef, the result of the second invocation depends on whether the object has been collected (and removed from the weak map) or not. See https://github.com/scala/scala-dev/issues/70#issuecomment-171701671
* Remove unused imports and other minor cleanupsSimon Ochsenreither2015-12-181-2/+0
| | | | | | | | | | - Language imports are preceding other imports - Deleted empty file: InlineErasure - Removed some unused private[parallel] methods in scala/collection/parallel/package.scala This removes hundreds of warnings when compiling with "-Xlint -Ywarn-dead-code -Ywarn-unused -Ywarn-unused-import".
* Merge remote-tracking branch 'origin/2.11.x' into 2.12.xSeth Tisue2015-09-081-1/+1
| | | | | | | | only trivial merge conflicts here. not dealing with PR #4333 in this merge because there is a substantial conflict there -- so that's why I stopped at 63daba33ae99471175e9d7b20792324615f5999b for now
* Merge branch '2.11.x' into 2.12.xAdriaan Moors2015-08-052-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Transcript: ``` ➜ scala git:(2.12.x) export MB=$(git merge-base 2.12.x 2.11.x) ➜ scala git:(2.12.x) echo $MB 0e9525aa618a2eca143a1c7379ff1e6efd23b86e ➜ scala git:(2.12.x) g log --oneline --graph $MB...2.11.x ``` Read this upside down :-). The last merge comes first, with merge commands interspersed in the git log. ``` ➜ scala git:(2.12.x) g merge 2.11.x Auto-merging versions.properties Auto-merging src/reflect/scala/reflect/internal/pickling/UnPickler.scala Auto-merging src/reflect/scala/reflect/internal/Types.scala Auto-merging src/reflect/scala/reflect/internal/TreeGen.scala Auto-merging src/library/scala/collection/immutable/Stream.scala Auto-merging src/library/scala/collection/convert/Wrappers.scala Auto-merging build.xml CONFLICT (content): Merge conflict in build.xml Auto-merging README.md Automatic merge failed; fix conflicts and then commit the result. ``` ``` * 928e6892d4 (scala/2.11.x, 2.11.x) Merge pull request #4682 from adriaanm/jline-quick.bin |\ | * b763dbf368 (adriaanm/jline-quick.bin, jline-quick.bin) Include jline on quick.bin tool path * | ccded7d179 Merge pull request #4680 from janekdb/2.11.x-option |\ \ | |/ |/| | * 58ae3e51f7 Delegate null test to Option |/ * a745f06e35 Merge pull request #4670 from retronym/ticket/9422 |\ | * ec95e534a2 SI-9422 Fix incorrect constant propagation * 65fa73dff3 Merge pull request #4669 from janekdb/2.11.x-scaladoc-reflect |\ | * e206a1837d ScalaDoc fixes for reflect * | 8e7e3b4a5f Merge pull request #4667 from janekdb/2.11.x-scaladoc-library-library-aux |\ \ | |/ |/| | * 69c2c106fe ScalaDoc fixes for library and library-aux * | 7de4cbc5e5 Merge pull request #4665 from lrytz/asm-504-3 |\ \ | * | cdc55c29d0 Upgrade scala-asm to 5.0.4-scala-3 |/ / * | d8da39a197 Merge pull request #4661 from retronym/ticket/9365 |\ \ | * | 0c99742c51 SI-9365 Don't null out dependencies of transient lazy vals | / * | 2279d3f3d9 Merge pull request #4662 from janekdb/2.11.x-redundant-val-modifier |\ \ | * | 173a6fad95 Remove redundant 'val' from case class params. * | | e0d21432d6 Merge pull request #4664 from SethTisue/remove-dead-link-in-readme |\ \ \ | |_|/ |/| | | * | 600fc4e6e1 fix readme for death of typesafe.artifactoryonline.com | |/ * | 7492bda816 Merge pull request #4636 from SethTisue/contributor-stuff-from-github-wiki |\ \ | |/ |/| | * ed5098dbc4 merge two reviewers lists in readme | * e136e4ad47 tighten up CONTRIBUTING.md a little | * f9ca6863d4 readme/contributor's guide tweaks | * 80e98b03a1 tiny readme fix | * 197845620c merge in text from pull request policy from old wiki | * e93ca409ae drop in pull request policy from old wiki | * 951939d1b3 contributor guide: add a morsel salvaged from GitHub wiki * f682441f6f Merge pull request #4653 from lrytz/t9403 |\ | * 2678d349b2 SI-9403 fix ICodeReader for negative BIPUSH / SIPUSH values ``` ``` ➜ scala git:(2.12.x) g merge -s ours f2d7838d90 Merge made by the 'ours' strategy. ``` ``` * f2d7838d90 Merge pull request #4657 from lrytz/backports |\ | * 241bb9ac19 Rename the ENUM / DEFAULTMETHOD flags to include JAVA_ | * 7a7f9927c3 SI-9393 fix modifiers of ClassBTypes for Java annotations | * 8946d60bd2 [backport] Fix bytecode stability when running the closure optimizer | * 3b6b2bfe9f [backport] SI-9392 Clarify the workaround comment and introduce a devWarning | * 091c1e6ed8 [backport] SI-9392 Avoid crash in GenBCode for incoherent trees | * 6177cb4481 [backport] SI-9393 Temporarily disable two assertions in GenBCode | * a1d471f7ba [backport] Refactor the ClosureOptimizer, run ProdCons only once per method | * f5e72765f2 [backport] SI-9387 Fix VerifyError introduced by indylambda | * 41b99e2531 [backport] Integrate the LMFInvokeDynamic extractor into LambdaMetaFactoryCall | * fc1cda2118 [backport] Small refactoring to the closure optimizer | * 8f272c0ad2 [backport] Accessibility checks for methods with an InvokeDynamic instruction | * 1c1d8259b5 [backport] Fix bytecode stability | * ef9d845676 [backport] Support methodHandle / invokeDynamic constant pool entries in scalap | * 60747c7555 [backport] Skip mirror class when invoking deserializeLambda | * 404e86239e [backport] Prevent infinite recursion in ProdConsAnalyzer | * 1b0703e74d [backport] SI-9376 don't crash when inlining a closure body that throws. | * e511375a90 [backport] Fix superclass for Java interface symbols created in JavaMirrors | * 1b57723169 [backport] `deserializeLambda` should not use encoded class name | * 8bafa8ed88 [backport] Java parser: default methods in interfaces are not `DEFERRED` | * 44e2761a9b [backport] SI-6613 fixed in GenBCode ``` ``` ➜ scala git:(2.12.x) g merge 4c6dcfe934 Auto-merging src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala Auto-merging doc/License.rtf Auto-merging doc/LICENSE.md Auto-merging build.xml Auto-merging build.sbt Merge made by the 'recursive' strategy. Auto packing the repository in background for optimum performance. See "git help gc" for manual housekeeping. build.sbt | 2 +- build.xml | 2 +- doc/LICENSE.md | 4 ++-- doc/License.rtf | 4 ++-- src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala | 2 +- src/scalap/decoder.properties | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) ``` ``` * | 4c6dcfe934 Merge pull request #4656 from lrytz/filtersOpenJDK |\ \ | |/ |/| | * 0b35bc29aa Ignore OpenJDK warnings in partest filters * 6eb0812050 Merge pull request #4644 from SethTisue/copyright-2015 * e0aac7c9ef bump copyright year to 2015 ```
| * ScalaDoc fixes for reflectJanek Bogucki2015-07-282-2/+2
| |
* | Query methods in api.Symbols for Java flagsLukas Rytz2015-07-222-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds query methods to the public reflection API for querying the JAVA_ENUM and JAVA_ANNOTATION flags. Didn't include JAVA_DEFAULTMETHOD because it does not correspond to a real java classfile flag (just a non-abstract method in an interface), and we want to clean the usage of this flag before adding it to a public API. The flags themselfs are not added to the reflection API. A comment in api/FlagSets.scala says: Q: I have a pretty flag. Can I put it here? A: Only if there's a tree that cannot be built without it. If you want to put a flag here so that it can be tested against, introduce an `isXXX` method in one of the api.Symbols classes instead.
* | Merge remote-tracking branch 'origin/2.11.x' into ↵Jason Zaugg2015-07-131-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | merge/2.11.x-to-2.12.x-20150713 Conflicts: src/eclipse/partest/.classpath src/eclipse/repl/.classpath test/files/run/nothingTypeNoFramesNoDce.scala test/files/run/repl-javap-app.check Also fixup two .classpath files with updated partest, xml and parser combinators JARs.
| * Fix 27 typos (p-r)Janek Bogucki2015-06-301-1/+1
| |
* | Merge branch '2.11.x' into merge/2.11.x-to-2.12.x-20150624Jason Zaugg2015-06-242-2/+2
|\|
| * Fix 25 typos (g-i)Janek Bogucki2015-06-222-2/+2
| |
* | Move a Scaladoc sentence to the correct methodAlexey Romanov2015-05-161-11/+12
|/ | | `paramLists` name doesn't end in `ss`, so that sentence belongs to `paramss`. Also a few punctuation fixes.
* Merge pull request #4475 from smarter/fix/old-spec-linksLukas Rytz2015-05-041-1/+1
|\ | | | | Remove references to the old PDF version of the specification
| * Remove references to the old PDF version of the specificationGuillaume Martres2015-04-301-1/+1
| |
* | Fix typo in Quasiquote doc that was confusingJean-Rémi Desjardins2015-04-101-1/+1
| |
* | Removed warningsEECOLOR2015-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added `since` to deprecation statement - Added unit to parameter list - Removed usage of deprecated method polyType - Replaced deprecated `debugwarn` with `devWarning` - Changed switch statement to if else in order to remove a warning - Switched implementation of `init` and `processOptions` to prevent warning - Replaced deprecated `Console.readLine` with `scala.io.StdIn.readLine` - Replaced deprecated `startOrPoint` with `start` - Replaced deprecated `tpe_=` with `setType` - Replaced deprecated `typeCheck` with `typecheck` - Replaced deprecated `CompilationUnit.warning` with `typer.context.warning` - Replaced deprecated `scala.tools.nsc.util.ScalaClassLoader` with `scala.reflect.internal.util.ScalaClassLoader` - Replaced deprecated `scala.tools.ListOfNil` with `scala.reflect.internal.util.ListOfNil` - Replaced deprecated `scala.tools.utils.ScalaClassLoader` with `scala.reflect.internal.util.ScalaClassLoader` - Replaced deprecated `emptyValDef` with `noSelfType` - In `BoxesRunTime` removed unused method and commented out unused values. Did not delete to keep a reference to the values. If they are deleted people might wonder why `1` and `2` are not used. - Replaced deprecated `scala.tools.nsc.util.AbstractFileClassLoader` with `scala.reflect.internal.util.AbstractFileClassLoader`
* | new{Term,Type}Name→{Term,Type}Name, tpename/nme→{type,term}NamesSimon Ochsenreither2015-03-263-7/+7
| |
* | Fix many typos in docs and commentsmpociecha2014-12-145-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit corrects many typos found in scaladocs, comments and documentation. It should reduce a bit number of PRs which fix one typo. There are no changes in the 'real' code except one corrected name of a JUnit test method and some error messages in exceptions. In the case of typos in other method or field names etc., I just skipped them. Obviously this commit doesn't fix all existing typos. I just generated in IntelliJ the list of potential typos and looked through it quickly.
* | Update ScalaDoc code examples not to use deprecated constructsLukasz Piepiora2014-11-2610-35/+35
| | | | | | | | | | - Replace newTermName in favour of TermName - Replace newTypeName in favour of TypeName
* | SI-8512 Infer Any for the qSom Snytt2014-08-121-1/+1
| | | | | | | | | | | | | | | | | | Avoid the widening bug for q. This resolution also suffers from the inference of Any, which can trigger a warning and an anxiety attack. But that's still better than doing the wrong thing. Right?
* | Merge pull request #3826 from lrytz/opt/refactorTrackedGrzegorz Kossakowski2014-07-251-0/+3
|\ \ | | | | | | Assortiment of cleanups and comments around the backend
| * | Documentation for isModuleClassLukas Rytz2014-07-081-0/+3
| |/
* | Add SerialVersionUID to SerializedTypeTag and SerializedExprPhilipp Haller2014-07-152-2/+2
| | | | | | | | | | | | | | The reason for adding the SerialVersionUID annotations is to be able to provide serialization stability throughout the 2.11.x series. And since type tags (and exprs) have not been serializable before, this does not break serialization for existing code.
* | SI-5919 TypeTags and Exprs should be serializablePhilipp Haller2014-07-154-28/+42
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* Update references to quasiquotes guideDenys Shabalin2014-04-032-5/+5
|
* SI-8388 consistently match type trees by originalsDenys Shabalin2014-03-251-4/+40
| | | | | | | | | | | | Due to the fact that all TypTrees are transformed into TypeTrees during typechecking one couldn't treat typed type trees in the same way as they treat untyped type trees. This change implements support for pattern matching of TypeTrees as their corresponding TypTree equivalent using tree preserved in the original. The implementation itself is a trivial wrapping of regular TypTree extractors into MaybeTypeTreeOriginal.
* Merge pull request #3647 from densh/si/8411Jason Zaugg2014-03-251-1/+1
|\ | | | | SI-8411 match desugared partial functions
| * SI-8411 match desugared partial functionsDenys Shabalin2014-03-221-1/+1
| |
* | introduces Mirror.typeOfEugene Burmako2014-03-251-0/+18
| | | | | | | | | | | | | | | | | | I just realized that our tag-based shortcuts were incomplete, because they only work with root mirrors (doing just u.typeTag[T].tpe means that the type is going to be resolved in u.rootMirror because that's the default). This commit fixes this oversight. I'm hoping for 2.11.0-RC3, but also feel free to reschedule to 2.12.0-M1 if it becomes clear that RC3 isn't happening.
* | SI-8200 provide an identity liftable for treesDenys Shabalin2014-03-241-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This liftable hasn't been originally included in the set of standard liftables due to following contradiction: 1. On one hand we can have identity lifting that seems to be quite consistent with regular unquoting: q"..${List(1,2)}" <==> q"1; 2" q"${List(1,2)}" <==> q"s.c.i.List(1, 2)" q"..${List(q"a", q"b")}” <==> q"a; b" q"${List(q"a", q"b")}" <==> q"s.c.i.List(a, b)" This is also consistent with how lisp unquoting works although they get lifting for free thanks to homoiconicity: // scala scala> val x = List(q"a", q"b); q"f($x)" q"f(s.c.i.List(a, b))" // scheme > (let [(x (list a b))] `(f ,x)) '(f (list a b)) 2. On the other hand lifting is an operation that converts a value into a code that when evaluated turns into the same value. In this sense Liftable[Tree] means reification of a tree into a tree that represents it, i.e.: q"${List(q"a", q"b")}" <==> q"""s.c.i.List(Ident(TermName("a")), Ident(TermName("b")))""" But I belive that such lifting will be very confusing for everyone other than a few very advanced users. This commit introduces the first option as a default Liftable for trees.
* SI-8366 make partial function and match trees disjointDenys Shabalin2014-03-101-1/+7
| | | | | | | | | | | | | | | | Previously one could match a partial function with match quasiquote: scala> val q"$scrutinee match { case ..$cases }" = q"{ case Foo => Bar }" scrutinee: universe.Tree = <empty> cases: List[universe.CaseDef] = List(case Foo => Bar) This was quite annoying as it leaked encoding of partial functions as Match trees with empty tree in place of scrutinee. This commit make sure that matches and partial functions are disjoint and don't match one another (while preserving original encoding under the hood out of sight of the end user.)
* Merge pull request #3594 from densh/si/8331Adriaan Moors2014-03-101-1/+14
|\ | | | | SI-8331 make sure type select & applied type doesn't match terms
| * SI-8331 make sure type select & applied type doesn't match termsDenys Shabalin2014-03-091-1/+14
| | | | | | | | | | | | Due to tree re-use it used to be the fact that type quasiquotes could match term trees. This commit makes sure selections and applied type and type applied are all non-overlapping between q and tq.
* | SI-8367 revert SI-8192's change to primaryConstructor when isJavaDefinedAdriaan Moors2014-03-071-0/+8
|/ | | | this is some weird stuff
* SI-8332 implicit class param unquoting in quasiquotesDenys Shabalin2014-03-021-1/+1
| | | | | | A new api that simplifies handling of implicit parameters has been mistakingly supporting just methods parameters. This commit adds support for class parameters too.
* Address pull request feedbackDenys Shabalin2014-02-242-3/+3
|
* Add ScalaDoc to Quasiquotes and Liftables parts of apiDenys Shabalin2014-02-242-7/+58
|
* Merge pull request #3546 from VladimirNik/typedTreesPrinter-2.11.0Jason Zaugg2014-02-211-5/+7
|\ | | | | CodePrinter added to Printers 2.11.0
| * printOwners support added to Printers; whitespaces removedVladimirNik2014-02-201-3/+3
| |
| * Attributed val/var processing for syntactics (SI-8180)VladimirNik2014-02-201-6/+8
| | | | | | | | | | | | TypedTreesPrinter added changes based on pull request comments: print root packages flag; tests for syntactics; SyntacticEmptyTypeTree added to Printers
* | Tweak signature for quasiquote's applyDenys Shabalin2014-02-201-1/+1
|/ | | | | | Even though quasiquotes are whitebox macros their return values are in fact always trees. This might help IDEs with macro expansions turned off.
* undeprecates typeSignature and typeSignatureInEugene Burmako2014-02-181-2/+0
| | | | | | | As per Jason's feedback, these are now undeprecated, being aliases for info and infoIn. I haven't touched the newly introduced setInfo family of methods, because I think that on internal level we don't need setTypeSignature anyway.
* makes sure compat._ provides full compatibility with 2.10.xEugene Burmako2014-02-182-0/+42
| | | | | | | | | | | | | | This is extremely important to enable cross-versioning Scala 2.10 codebases against Scala 2.11 using Jason's trick with: // TODO 2.11 Remove this after dropping 2.10.x support. private object HasCompat { val compat = ??? }; import HasCompat._ def impl(c: Context)(...): ... = { import c.universe._ import compat._ ... }
* reverses SI-6484Eugene Burmako2014-02-181-14/+2
| | | | | Unfortunately I have to revert b017629 because of SI-8303. There are projects (e.g. slick) that use typeOf in annotations, which effectively means bye-bye.
* better deprecation message for Symbol.companionSymbolEugene Burmako2014-02-161-1/+1
|
* Merge remote-tracking branch 'origin/master' into topic/palladium0Eugene Burmako2014-02-163-11/+15
|\ | | | | | | | | | | | | | | Conflicts: src/compiler/scala/reflect/macros/compiler/Resolvers.scala src/compiler/scala/reflect/macros/contexts/Typers.scala src/compiler/scala/tools/reflect/ToolBoxFactory.scala src/reflect/scala/reflect/api/BuildUtils.scala
| * Merge pull request #3397 from xeno-by/ticket/5920Jason Zaugg2014-02-161-6/+10
| |\ | | | | | | SI-5920 enables default and named args in macros