Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
comment
  • Loading branch information
n-young-db committed Apr 29, 2024
commit dbf703d2f3fed2c84df8b70b7645db68e1acd4ff
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ abstract class TreeNode[BaseType <: TreeNode[BaseType]]
/**
* A mutable map for holding auxiliary information of this tree node. It will be carried over
* when this node is copied via `makeCopy`, or transformed via `transformUp`/`transformDown`.
* We lazily evaluate the `tags` since the default size of a `mutable.Map` is nonzero. This
* will reduce unnecessary memory pressure.
*/
private[this] var _tags: mutable.Map[TreeNodeTag[_], Any] = null
private def tags: mutable.Map[TreeNodeTag[_], Any] = {
Expand Down