File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
compiler/src/dotty/tools/dotc/interpreter Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,5 @@ package dotty.tools.dotc.interpreter
22
33import dotty .tools .dotc .ast .tpd
44
5- class RawExpr (val tree : tpd.Tree ) extends quoted.Expr [Any ] with RawQuoted {
6- override def toString : String = s " RawExpr( ${tree.toString}) "
7- }
5+ /** Expression `quoted.Expr[_]` for which its internal representation is its tree. */
6+ final class RawExpr (val tree : tpd.Tree ) extends quoted.Expr [Any ] with RawQuoted
Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ package dotty.tools.dotc.interpreter
22
33import dotty .tools .dotc .ast .tpd
44
5+ /** Quoted `quoted.Quoted` for which its internal representation is its tree.
6+ * - Used for trees that cannot be serialized, such as references to local symbols that will be spliced in.
7+ * - Used for trees that do not need to be serialized to avoid the overhead of serialization/deserialization.
8+ */
59trait RawQuoted extends quoted.Quoted {
610 def tree : tpd.Tree
11+ override def toString : String = s " ${this .getClass.getName}( ${tree.toString}) "
712}
Original file line number Diff line number Diff line change @@ -2,6 +2,5 @@ package dotty.tools.dotc.interpreter
22
33import dotty .tools .dotc .ast .tpd
44
5- class RawType (val tree : tpd.Tree ) extends quoted.Type [Any ] with RawQuoted {
6- override def toString : String = s " RawType( ${tree.toString}) "
7- }
5+ /** Type `quoted.Type[_]` for which its internal representation is its type tree. */
6+ final class RawType (val tree : tpd.Tree ) extends quoted.Type [Any ] with RawQuoted
You can’t perform that action at this time.
0 commit comments