diff options
author | Adriaan Moors <adriaan@lightbend.com> | 2016-07-08 17:24:23 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan@lightbend.com> | 2016-08-11 10:59:17 -0700 |
commit | fdc94676928cd9177acfcca8eb7d669e1f4eac48 (patch) | |
tree | c99a021f8c0fc6e691bc63f5c8cc635a38380e78 /src/reflect | |
parent | 3540ffc1fb81eef75aeff41a0ba9142b1cce8a53 (diff) | |
download | scala-fdc94676928cd9177acfcca8eb7d669e1f4eac48.tar.gz scala-fdc94676928cd9177acfcca8eb7d669e1f4eac48.tar.bz2 scala-fdc94676928cd9177acfcca8eb7d669e1f4eac48.zip |
Drive accessor synthesis from info transformer
Derive/filter/propagate annotations in info transformer,
don't rely on having type checked the derived trees in order
to see the annotations.
Use synthetics mechanism for bean accessors -- the others
will soon follow.
Propagate inferred tpt from valdef to accessors
by setting type in right spot of synthetic tree
during the info completer.
No need to add trees in derivedTrees, and get rid of
some overfactoring in method synthesis, now that we have
joined symbol and tree creation.
Preserve symbol order because tests are sensitive to it.
Drop warning on potentially discarded annotations,
I don't think this warrants a warning.
Motivated by breaking the scala-js compiler, which relied
on annotations appearing when trees are type checked.
Now that ordering constraint is gone in the new encoding,
we may as well finally fix annotation assignment.
Diffstat (limited to 'src/reflect')
-rw-r--r-- | src/reflect/scala/reflect/internal/AnnotationInfos.scala | 9 | ||||
-rw-r--r-- | src/reflect/scala/reflect/internal/StdNames.scala | 3 |
2 files changed, 2 insertions, 10 deletions
diff --git a/src/reflect/scala/reflect/internal/AnnotationInfos.scala b/src/reflect/scala/reflect/internal/AnnotationInfos.scala index d58cabf3d7..cfde164754 100644 --- a/src/reflect/scala/reflect/internal/AnnotationInfos.scala +++ b/src/reflect/scala/reflect/internal/AnnotationInfos.scala @@ -175,15 +175,6 @@ trait AnnotationInfos extends api.Annotations { self: SymbolTable => case (Nil, defaults) => defaults contains category case (metas, _) => metas exists (_ matches category) } - - def mkFilter(categories: List[Symbol], defaultRetention: Boolean)(ann: AnnotationInfo) = - (ann.metaAnnotations, ann.defaultTargets) match { - case (Nil, Nil) => defaultRetention - case (Nil, defaults) => categories exists defaults.contains - case (metas, _) => - val metaSyms = metas collect { case ann if !ann.symbol.isInstanceOf[StubSymbol] => ann.symbol } - categories exists (category => metaSyms exists (_ isNonBottomSubClass category)) - } } class CompleteAnnotationInfo( diff --git a/src/reflect/scala/reflect/internal/StdNames.scala b/src/reflect/scala/reflect/internal/StdNames.scala index 11b5db9793..925018d3a6 100644 --- a/src/reflect/scala/reflect/internal/StdNames.scala +++ b/src/reflect/scala/reflect/internal/StdNames.scala @@ -95,6 +95,8 @@ trait StdNames { val NAME_JOIN_STRING: String = NameTransformer.NAME_JOIN_STRING val MODULE_SUFFIX_STRING: String = NameTransformer.MODULE_SUFFIX_STRING val LOCAL_SUFFIX_STRING: String = NameTransformer.LOCAL_SUFFIX_STRING + val LAZY_LOCAL_SUFFIX_STRING: String = NameTransformer.LAZY_LOCAL_SUFFIX_STRING + val TRAIT_SETTER_SEPARATOR_STRING: String = NameTransformer.TRAIT_SETTER_SEPARATOR_STRING val SINGLETON_SUFFIX: String = ".type" @@ -337,7 +339,6 @@ trait StdNames { val DEFAULT_CASE: NameType = "defaultCase$" val EQEQ_LOCAL_VAR: NameType = "eqEqTemp$" val FAKE_LOCAL_THIS: NameType = "this$" - val LAZY_LOCAL: NameType = "$lzy" val LAZY_SLOW_SUFFIX: NameType = "$lzycompute" val UNIVERSE_BUILD_PREFIX: NameType = "$u.internal.reificationSupport." val UNIVERSE_PREFIX: NameType = "$u." |