You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Desugar mixed in module var and accessor in refchecks
Rather than leaving it until mixin.
The current code in mixin is used for both lazy val and modules,
and puts the "slow path" code that uses the monitor into a
dedicated method (`moduleName$lzyCompute`). I tracked this
back to a3d4d17. I can't tell from that commit whether the
performance sensititivity was related to modules or lazy vals,
from the commit message I'd say the latter.
As the initialization code for a module is just a constructor call,
rather than an arbitraryly large chunk of code for a lazy initializer,
this commit opts to inline the `lzycompute` method.
currentOwner.primaryConstructor makeNotPrivate NoSymbol// SI-6601, must be done *after* pickler!
1658
-
if (bridges.nonEmpty) deriveTemplate(tree)(_ ::: bridges) else tree
1669
+
if (bridges.nonEmpty|| moduleDesugared.nonEmpty) deriveTemplate(tree)(_ ::: bridges::: moduleDesugared) else tree
1659
1670
1660
1671
case dc@TypeTreeWithDeferredRefCheck() => abort("adapt should have turned dc: TypeTreeWithDeferredRefCheck into tpt: TypeTree, with tpt.original == dc")
0 commit comments