diff options
author | Martin Odersky <odersky@gmail.com> | 2016-09-09 18:39:49 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-10-02 16:11:21 +0200 |
commit | b1cda4fadcb586a82b546751d5cc426cd5382cd5 (patch) | |
tree | 9d14f1ab02caa846d347033cf444c6e68b1ea746 /src/dotty/tools/dotc/ast/Trees.scala | |
parent | c9e45de0042e9a50397bf922d812d764b36e4d12 (diff) | |
download | dotty-b1cda4fadcb586a82b546751d5cc426cd5382cd5.tar.gz dotty-b1cda4fadcb586a82b546751d5cc426cd5382cd5.tar.bz2 dotty-b1cda4fadcb586a82b546751d5cc426cd5382cd5.zip |
Better names and documentation for Inliner.
Diffstat (limited to 'src/dotty/tools/dotc/ast/Trees.scala')
-rw-r--r-- | src/dotty/tools/dotc/ast/Trees.scala | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/ast/Trees.scala b/src/dotty/tools/dotc/ast/Trees.scala index fca1c1500..7e7c74928 100644 --- a/src/dotty/tools/dotc/ast/Trees.scala +++ b/src/dotty/tools/dotc/ast/Trees.scala @@ -503,7 +503,20 @@ object Trees { override def toString = s"JavaSeqLiteral($elems, $elemtpt)" } - /** Inlined code */ + /** A tree representing inlined code. + * + * @param call The original call that was inlined + * @param bindings Bindings for proxies to be used in the inlined code + * @param expansion The inlined tree, minus bindings. + * + * The full inlined code is equivalent to + * + * { bindings; expansion } + * + * The reason to keep `bindings` separate is because they are typed in a + * different context: `bindings` represent the arguments to the inlined + * call, whereas `expansion` represents the body of the inlined function. + */ case class Inlined[-T >: Untyped] private[ast] (call: tpd.Tree, bindings: List[MemberDef[T]], expansion: Tree[T]) extends Tree[T] { type ThisTree[-T >: Untyped] = Inlined[T] |