diff options
author | Martin Odersky <odersky@gmail.com> | 2016-09-15 18:51:55 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-10-02 16:12:28 +0200 |
commit | bef012d32127e3d256d0ce31e1a2a27f7277f8d8 (patch) | |
tree | cae40c2211cfece2bfb0312af732ddfaa47c1ac5 /src/dotty/tools/dotc/core/Annotations.scala | |
parent | ce9efda393055060a73509d1c10b8bdd9f2f0136 (diff) | |
download | dotty-bef012d32127e3d256d0ce31e1a2a27f7277f8d8.tar.gz dotty-bef012d32127e3d256d0ce31e1a2a27f7277f8d8.tar.bz2 dotty-bef012d32127e3d256d0ce31e1a2a27f7277f8d8.zip |
Move logic from InlineInfo to BodyAnnot
Now that we have BodyAnnot, InlineInfo can be eliminated.
Diffstat (limited to 'src/dotty/tools/dotc/core/Annotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Annotations.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Annotations.scala b/src/dotty/tools/dotc/core/Annotations.scala index fde41ef76..0e8e5a1f0 100644 --- a/src/dotty/tools/dotc/core/Annotations.scala +++ b/src/dotty/tools/dotc/core/Annotations.scala @@ -26,6 +26,8 @@ object Annotations { } def argumentConstant(i: Int)(implicit ctx: Context): Option[Constant] = for (ConstantType(c) <- argument(i) map (_.tpe)) yield c + + def ensureCompleted(implicit ctx: Context): Unit = tree } case class ConcreteAnnotation(t: Tree) extends Annotation { @@ -44,13 +46,14 @@ object Annotations { /** An annotation indicating the body of a right-hand side, * typically of an inline method. Treated specially in - * pickling/unpickling and treecopies + * pickling/unpickling and TypeTreeMaps */ abstract class BodyAnnotation extends Annotation { override def symbol(implicit ctx: Context) = defn.BodyAnnot override def derivedAnnotation(tree: Tree)(implicit ctx: Context) = if (tree eq this.tree) this else ConcreteBodyAnnotation(tree) override def arguments(implicit ctx: Context) = Nil + override def ensureCompleted(implicit ctx: Context) = () } case class ConcreteBodyAnnotation(body: Tree) extends BodyAnnotation { @@ -68,6 +71,7 @@ object Annotations { } myBody } + def isEvaluated = evaluated } object Annotation { |