diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-03-25 13:48:27 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-04-03 02:49:39 +0200 |
commit | e47483aaf9469b4b29f747511a231ebf6e52aa94 (patch) | |
tree | 3af2ac13c54c598e72a338c5f967cbdaf029b099 /src/dotty/tools/dotc/CompilationUnit.scala | |
parent | 559701471e8c6e8a6bd18b141008dbf31c87ae9b (diff) | |
download | dotty-e47483aaf9469b4b29f747511a231ebf6e52aa94.tar.gz dotty-e47483aaf9469b4b29f747511a231ebf6e52aa94.tar.bz2 dotty-e47483aaf9469b4b29f747511a231ebf6e52aa94.zip |
Address reviewer comments on #416
Diffstat (limited to 'src/dotty/tools/dotc/CompilationUnit.scala')
-rw-r--r-- | src/dotty/tools/dotc/CompilationUnit.scala | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/CompilationUnit.scala b/src/dotty/tools/dotc/CompilationUnit.scala index 2f5f1202d..de51a84cf 100644 --- a/src/dotty/tools/dotc/CompilationUnit.scala +++ b/src/dotty/tools/dotc/CompilationUnit.scala @@ -17,10 +17,25 @@ class CompilationUnit(val source: SourceFile) { var tpdTree: tpd.Tree = tpd.EmptyTree def isJava = source.file.name.endsWith(".java") - - lazy val pickled: TastyPickler = new TastyPickler() + /** + * Pickler used to create TASTY sections. + * Sections: Header, ASTs and Positions are populated by `pickler` phase. + * Subsequent phases can add new sections. + */ + lazy val pickler: TastyPickler = new TastyPickler() + + /** + * Addresses in TASTY file of trees, stored by pickling. + * Note that trees are checked for reference equality, + * so one can reliably use this function only dirrectly after `pickler` + */ var addrOfTree: tpd.Tree => Option[Addr] = (_ => None) + /** + * Addresses in TASTY file of symbols, stored by pickling. + * Note that trees are checked for reference equality, + * so one can reliably use this function only dirrectly after `pickler` + */ var addrOfSym: Symbol => Option[Addr] = (_ => None) }
\ No newline at end of file |