File tree 3 files changed +4
-3
lines changed
3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -56,12 +56,13 @@ class Run(comp: Compiler)(implicit ctx: Context) {
56
56
ctx.usePhases(phases)
57
57
for (phase <- ctx.allPhases)
58
58
if (! ctx.reporter.hasErrors) {
59
- if (ctx.settings.verbose.value) ctx.println( s " [ $phase ] " )
59
+ val start = System .currentTimeMillis
60
60
units = phase.runOn(units)
61
61
def foreachUnit (op : Context => Unit )(implicit ctx : Context ): Unit =
62
62
for (unit <- units) op(ctx.fresh.setPhase(phase.next).setCompilationUnit(unit))
63
63
if (ctx.settings.Xprint .value.containsPhase(phase))
64
64
foreachUnit(printTree)
65
+ ctx.informTime(s " $phase " , start)
65
66
}
66
67
}
67
68
Original file line number Diff line number Diff line change @@ -609,7 +609,7 @@ object Types {
609
609
(name, buf) => buf ++= member(name).altsWith(x => ! x.is(Method )))
610
610
}
611
611
612
- /** The set of members of this type having at least one of `requiredFlags` but none of `excludedFlags` set */
612
+ /** The set of members of this type having at least one of `requiredFlags` but none of `excludedFlags` set */
613
613
final def membersBasedOnFlags (requiredFlags : FlagSet , excludedFlags : FlagSet )(implicit ctx : Context ): Seq [SingleDenotation ] = track(" implicitMembers" ) {
614
614
memberDenots(takeAllFilter,
615
615
(name, buf) => buf ++= memberExcluding(name, excludedFlags).altsWith(x => x.is(requiredFlags)))
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ class LazyVals extends MiniPhaseTransform with IdentityDenotTransformer with Nee
48
48
override def runsAfter = Set (classOf [Mixin ])
49
49
50
50
def isCompanionNeeded (cls : ClassSymbol )(implicit ctx : Context ): Boolean = {
51
- def hasLazyVal (x : ClassSymbol ) = x.classInfo.membersBasedOnFlags( Flags . Lazy , excludedFlags = Flags .EmptyFlags ).nonEmpty
51
+ def hasLazyVal (cls : ClassSymbol ) = cls.info.decls.exists(_.is( Flags .Lazy ))
52
52
hasLazyVal(cls) || cls.mixins.exists(hasLazyVal)
53
53
}
54
54
You can’t perform that action at this time.
0 commit comments