diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2017-01-31 14:24:41 +0100 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2017-01-31 14:35:43 +0100 |
commit | 1fe56e16de74c4c90eec5a4c411ba0b1adde0ee2 (patch) | |
tree | 5758270b371391746dcc7171d519d68f0c83f588 /doc-tool/src/dotty/tools/dottydoc/util/mutate.scala | |
parent | fef1af300edfa0697f9d8f749a5c9398f209bf36 (diff) | |
download | dotty-1fe56e16de74c4c90eec5a4c411ba0b1adde0ee2.tar.gz dotty-1fe56e16de74c4c90eec5a4c411ba0b1adde0ee2.tar.bz2 dotty-1fe56e16de74c4c90eec5a4c411ba0b1adde0ee2.zip |
Fix `setParent` for `TypeAlias` and only recurse from root
Previously all packages would be iterated through on `setParent`. With
this change, only the root packages will be mutated. This gives about
30% speedup for doc compile on Dotty
Diffstat (limited to 'doc-tool/src/dotty/tools/dottydoc/util/mutate.scala')
-rw-r--r-- | doc-tool/src/dotty/tools/dottydoc/util/mutate.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc-tool/src/dotty/tools/dottydoc/util/mutate.scala b/doc-tool/src/dotty/tools/dottydoc/util/mutate.scala index 739a1e19d..4633bf257 100644 --- a/doc-tool/src/dotty/tools/dottydoc/util/mutate.scala +++ b/doc-tool/src/dotty/tools/dottydoc/util/mutate.scala @@ -16,9 +16,13 @@ object setters { case x: ObjectImpl => x.comment = to case x: DefImpl => x.comment = to case x: ValImpl => x.comment = to + case x: TypeAliasImpl => x.comment = to } def setParent(ent: Entity, to: Entity): Unit = ent match { + case e: PackageImpl => + e.parent = to + e.members.foreach(setParent(_, e)) case e: ClassImpl => e.parent = to e.members.foreach(setParent(_, e)) |