aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-10-18 00:23:15 +0200
committerMartin Odersky <odersky@gmail.com>2016-10-18 00:23:15 +0200
commitfc6b8fba13a4ac1823763410568a48e46e4b2192 (patch)
treeaf69416baf7da4f441fcc5600c0d9aca304b3f95 /src
parent68608986741a3b32e2b1a328466e15ec0e7ab5b8 (diff)
downloaddotty-fc6b8fba13a4ac1823763410568a48e46e4b2192.tar.gz
dotty-fc6b8fba13a4ac1823763410568a48e46e4b2192.tar.bz2
dotty-fc6b8fba13a4ac1823763410568a48e46e4b2192.zip
Mention Inlined transformation in docs
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/ast/Trees.scala4
-rw-r--r--src/dotty/tools/dotc/printing/RefinedPrinter.scala2
-rw-r--r--src/dotty/tools/dotc/transform/PostTyper.scala3
3 files changed, 7 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/ast/Trees.scala b/src/dotty/tools/dotc/ast/Trees.scala
index dca66a01d..4c63a67ce 100644
--- a/src/dotty/tools/dotc/ast/Trees.scala
+++ b/src/dotty/tools/dotc/ast/Trees.scala
@@ -502,7 +502,9 @@ object Trees {
/** A tree representing inlined code.
*
- * @param call The original call that was inlined
+ * @param call Info about the original call that was inlined
+ * Until PostTyper, this is the full call, afterwards only
+ * a reference to the toplevel class from which the call was inlined.
* @param bindings Bindings for proxies to be used in the inlined code
* @param expansion The inlined tree, minus bindings.
*
diff --git a/src/dotty/tools/dotc/printing/RefinedPrinter.scala b/src/dotty/tools/dotc/printing/RefinedPrinter.scala
index 8b34b3ef8..31d45d42c 100644
--- a/src/dotty/tools/dotc/printing/RefinedPrinter.scala
+++ b/src/dotty/tools/dotc/printing/RefinedPrinter.scala
@@ -527,7 +527,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
}
if (ctx.settings.Yprintpos.value && !tree.isInstanceOf[WithoutTypeOrPos[_]]) {
val pos = if (homogenizedView) tree.pos.toSynthetic else tree.pos
- txt = (txt ~ "@" ~ pos.toString).close
+ txt = (txt ~ "@" ~ pos.toString /*~ tree.getClass.toString*/).close
}
tree match {
case Block(_, _) | Template(_, _, _, _) => txt
diff --git a/src/dotty/tools/dotc/transform/PostTyper.scala b/src/dotty/tools/dotc/transform/PostTyper.scala
index fe542ca0a..e4447509b 100644
--- a/src/dotty/tools/dotc/transform/PostTyper.scala
+++ b/src/dotty/tools/dotc/transform/PostTyper.scala
@@ -41,6 +41,9 @@ import Symbols._, TypeUtils._
*
* (10) Adds Child annotations to all sealed classes
*
+ * (11) Minimizes `call` fields of `Inline` nodes to just point to the toplevel
+ * class from which code was inlined.
+ *
* The reason for making this a macro transform is that some functions (in particular
* super and protected accessors and instantiation checks) are naturally top-down and
* don't lend themselves to the bottom-up approach of a mini phase. The other two functions