Skip to content

Commit 04d0dc9

Browse files
committed
Performance tweak
1 parent 3adfcea commit 04d0dc9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,7 @@ trait BCodeSkelBuilder extends BCodeHelpers {
171171
cpy.TypeDef(cd0)(rhs = impl2)
172172
} else cd0
173173

174-
val methodSymbols = for (f <- cd.symbol.info.decls.toList if f.is(Method) && f.isTerm && !f.is(Module)) yield f
175-
val hasStaticCtor = methodSymbols exists (_.isStaticConstructor)
174+
val hasStaticCtor = isCZStaticModule || cd.symbol.info.decls.exists(_.isStaticConstructor)
176175
if (!hasStaticCtor && isCZParcelable) fabricateStaticInitAndroid()
177176

178177
val optSerial: Option[Long] =

0 commit comments

Comments
 (0)