From 515e66052ff1f9797a0e86c3691f820c66bbda36 Mon Sep 17 00:00:00 2001 From: Jaroslav Tulach Date: Mon, 2 Oct 2023 14:43:56 +0200 Subject: [PATCH] Avoid classloading deadlock by delaying computations of other passes (#7943) Fixes #7850 by computing other passes lazily. --- .../org/enso/compiler/pass/analyse/AliasAnalysis.scala | 4 ++-- .../compiler/pass/analyse/AmbiguousImportsAnalysis.scala | 4 ++-- .../enso/compiler/pass/analyse/AutomaticParallelism.scala | 4 ++-- .../org/enso/compiler/pass/analyse/BindingAnalysis.scala | 4 ++-- .../compiler/pass/analyse/CachePreferenceAnalysis.scala | 4 ++-- .../org/enso/compiler/pass/analyse/DataflowAnalysis.scala | 4 ++-- .../org/enso/compiler/pass/analyse/DemandAnalysis.scala | 4 ++-- .../enso/compiler/pass/analyse/GatherDiagnostics.scala | 4 ++-- .../enso/compiler/pass/analyse/ImportSymbolAnalysis.scala | 4 ++-- .../scala/org/enso/compiler/pass/analyse/TailCall.scala | 4 ++-- .../org/enso/compiler/pass/desugar/ComplexType.scala | 4 ++-- .../org/enso/compiler/pass/desugar/FunctionBinding.scala | 4 ++-- .../enso/compiler/pass/desugar/GenerateMethodBodies.scala | 4 ++-- .../scala/org/enso/compiler/pass/desugar/Imports.scala | 4 ++-- .../compiler/pass/desugar/LambdaShorthandToLambda.scala | 4 ++-- .../enso/compiler/pass/desugar/NestedPatternMatch.scala | 4 ++-- .../enso/compiler/pass/desugar/OperatorToFunction.scala | 4 ++-- .../org/enso/compiler/pass/desugar/SectionsToBinOp.scala | 4 ++-- .../org/enso/compiler/pass/lint/ModuleNameConflicts.scala | 4 ++-- .../org/enso/compiler/pass/lint/NoSelfInStatic.scala | 4 ++-- .../enso/compiler/pass/lint/ShadowedPatternFields.scala | 4 ++-- .../org/enso/compiler/pass/lint/UnusedBindings.scala | 4 ++-- .../compiler/pass/optimise/ApplicationSaturation.scala | 4 ++-- .../enso/compiler/pass/optimise/LambdaConsolidate.scala | 4 ++-- .../compiler/pass/optimise/UnreachableMatchBranches.scala | 4 ++-- .../compiler/pass/resolve/DocumentationComments.scala | 4 ++-- .../compiler/pass/resolve/ExpressionAnnotations.scala | 4 ++-- .../compiler/pass/resolve/FullyAppliedFunctionUses.scala | 4 ++-- .../enso/compiler/pass/resolve/FullyQualifiedNames.scala | 4 ++-- .../enso/compiler/pass/resolve/GenericAnnotations.scala | 4 ++-- .../org/enso/compiler/pass/resolve/GlobalNames.scala | 4 ++-- .../org/enso/compiler/pass/resolve/IgnoredBindings.scala | 4 ++-- .../org/enso/compiler/pass/resolve/MethodCalls.scala | 4 ++-- .../enso/compiler/pass/resolve/MethodDefinitions.scala | 4 ++-- .../enso/compiler/pass/resolve/ModuleAnnotations.scala | 4 ++-- .../enso/compiler/pass/resolve/OverloadsResolution.scala | 4 ++-- .../scala/org/enso/compiler/pass/resolve/Patterns.scala | 4 ++-- .../enso/compiler/pass/resolve/SuspendedArguments.scala | 4 ++-- .../org/enso/compiler/pass/resolve/TypeFunctions.scala | 4 ++-- .../scala/org/enso/compiler/pass/resolve/TypeNames.scala | 4 ++-- .../org/enso/compiler/pass/resolve/TypeSignatures.scala | 4 ++-- .../test/scala/org/enso/compiler/test/PassesTest.scala | 4 ++-- .../enso/compiler/test/core/ir/MetadataStorageTest.scala | 8 ++++---- .../enso/compiler/test/pass/PassConfigurationTest.scala | 8 ++++---- 44 files changed, 92 insertions(+), 92 deletions(-) diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/AliasAnalysis.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/AliasAnalysis.scala index f8d5ccfaa5..21e43a6a38 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/AliasAnalysis.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/AliasAnalysis.scala @@ -75,7 +75,7 @@ case object AliasAnalysis extends IRPass { override type Metadata = Info override type Config = Configuration - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( FunctionBinding, GenerateMethodBodies, SectionsToBinOp, @@ -83,7 +83,7 @@ case object AliasAnalysis extends IRPass { LambdaShorthandToLambda ) - override val invalidatedPasses: Seq[IRPass] = + override lazy val invalidatedPasses: Seq[IRPass] = List(DataflowAnalysis, UnusedBindings) /** Performs alias analysis on a module. diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/AmbiguousImportsAnalysis.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/AmbiguousImportsAnalysis.scala index 94d844ba24..6abdadb0bc 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/AmbiguousImportsAnalysis.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/AmbiguousImportsAnalysis.scala @@ -37,10 +37,10 @@ case object AmbiguousImportsAnalysis extends IRPass { override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = + override lazy val precursorPasses: Seq[IRPass] = Seq(BindingAnalysis, ImportSymbolAnalysis) - override val invalidatedPasses: Seq[IRPass] = + override lazy val invalidatedPasses: Seq[IRPass] = Seq() /** @inheritdoc diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/AutomaticParallelism.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/AutomaticParallelism.scala index a12d1a35e7..2106e23ae4 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/AutomaticParallelism.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/AutomaticParallelism.scala @@ -41,11 +41,11 @@ import scala.annotation.{tailrec, unused} object AutomaticParallelism extends IRPass { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = Seq( + override lazy val precursorPasses: Seq[IRPass] = Seq( AliasAnalysis, ComplexType ) - override val invalidatedPasses: Seq[IRPass] = Seq( + override lazy val invalidatedPasses: Seq[IRPass] = Seq( AliasAnalysis, DataflowAnalysis ) diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/BindingAnalysis.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/BindingAnalysis.scala index fff6e8f131..f9670188f2 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/BindingAnalysis.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/BindingAnalysis.scala @@ -31,11 +31,11 @@ case object BindingAnalysis extends IRPass { override type Config = IRPass.Configuration.Default /** The passes that this pass depends _directly_ on to run. */ - override val precursorPasses: Seq[IRPass] = + override lazy val precursorPasses: Seq[IRPass] = Seq(ComplexType, FunctionBinding, GenerateMethodBodies) /** The passes that are invalidated by running this pass. */ - override val invalidatedPasses: Seq[IRPass] = + override lazy val invalidatedPasses: Seq[IRPass] = Seq(MethodDefinitions, Patterns) /** Executes the pass on the provided `ir`, and returns a possibly transformed diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/CachePreferenceAnalysis.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/CachePreferenceAnalysis.scala index 35f98b7670..48a75f5f9d 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/CachePreferenceAnalysis.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/CachePreferenceAnalysis.scala @@ -35,7 +35,7 @@ case object CachePreferenceAnalysis extends IRPass { override type Metadata = WeightInfo /** Run desugaring passes first. */ - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( ComplexType, FunctionBinding, GenerateMethodBodies, @@ -44,7 +44,7 @@ case object CachePreferenceAnalysis extends IRPass { SectionsToBinOp ) - override val invalidatedPasses: Seq[IRPass] = List() + override lazy val invalidatedPasses: Seq[IRPass] = List() /** Performs the cache preference analysis on a module. * diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/DataflowAnalysis.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/DataflowAnalysis.scala index e9f1b8198f..228cdb2bf6 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/DataflowAnalysis.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/DataflowAnalysis.scala @@ -52,13 +52,13 @@ case object DataflowAnalysis extends IRPass { override type Metadata = DependencyInfo override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( AliasAnalysis, DemandAnalysis, TailCall ) - override val invalidatedPasses: Seq[IRPass] = List() + override lazy val invalidatedPasses: Seq[IRPass] = List() /** Executes the dataflow analysis process on an Enso module. * diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/DemandAnalysis.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/DemandAnalysis.scala index 170dde6fe8..38094bf942 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/DemandAnalysis.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/DemandAnalysis.scala @@ -41,13 +41,13 @@ case object DemandAnalysis extends IRPass { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( AliasAnalysis, LambdaConsolidate, OverloadsResolution ) - override val invalidatedPasses: Seq[IRPass] = List(AliasAnalysis) + override lazy val invalidatedPasses: Seq[IRPass] = List(AliasAnalysis) /** Executes the demand analysis process on an Enso module. * diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/GatherDiagnostics.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/GatherDiagnostics.scala index 39a11697e6..d176302ee5 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/GatherDiagnostics.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/GatherDiagnostics.scala @@ -24,8 +24,8 @@ case object GatherDiagnostics extends IRPass { override type Metadata = DiagnosticsMeta override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List(TypeSignatures) - override val invalidatedPasses: Seq[IRPass] = List() + override lazy val precursorPasses: Seq[IRPass] = List(TypeSignatures) + override lazy val invalidatedPasses: Seq[IRPass] = List() /** Executes the pass on the provided `ir`, and attaches all the encountered * diagnostics to its metadata storage. diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/ImportSymbolAnalysis.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/ImportSymbolAnalysis.scala index ab0164e12b..3ebd77260a 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/ImportSymbolAnalysis.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/ImportSymbolAnalysis.scala @@ -19,10 +19,10 @@ case object ImportSymbolAnalysis extends IRPass { override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = + override lazy val precursorPasses: Seq[IRPass] = Seq(BindingAnalysis, GenerateMethodBodies) - override val invalidatedPasses: Seq[IRPass] = + override lazy val invalidatedPasses: Seq[IRPass] = Seq() /** @inheritdoc diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/TailCall.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/TailCall.scala index 5c393019e3..f307e8a0ee 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/TailCall.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/TailCall.scala @@ -49,7 +49,7 @@ case object TailCall extends IRPass { override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( FunctionBinding, GenerateMethodBodies, SectionsToBinOp, @@ -58,7 +58,7 @@ case object TailCall extends IRPass { GlobalNames ) - override val invalidatedPasses: Seq[IRPass] = List() + override lazy val invalidatedPasses: Seq[IRPass] = List() /** Analyses tail call state for expressions in a module. * diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/ComplexType.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/ComplexType.scala index 0e13e3d642..b1967f3eac 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/ComplexType.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/ComplexType.scala @@ -53,8 +53,8 @@ case object ComplexType extends IRPass { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List(ModuleAnnotations) - override val invalidatedPasses: Seq[IRPass] = + override lazy val precursorPasses: Seq[IRPass] = List(ModuleAnnotations) + override lazy val invalidatedPasses: Seq[IRPass] = List( AliasAnalysis, ApplicationSaturation, diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/FunctionBinding.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/FunctionBinding.scala index 2c82b0a858..0530c4ccbb 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/FunctionBinding.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/FunctionBinding.scala @@ -41,8 +41,8 @@ case object FunctionBinding extends IRPass { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List(ComplexType) - override val invalidatedPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List(ComplexType) + override lazy val invalidatedPasses: Seq[IRPass] = List( AliasAnalysis, DataflowAnalysis, DemandAnalysis, diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/GenerateMethodBodies.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/GenerateMethodBodies.scala index 0e6d1b755c..8de1db62f8 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/GenerateMethodBodies.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/GenerateMethodBodies.scala @@ -48,9 +48,9 @@ case object GenerateMethodBodies extends IRPass { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = + override lazy val precursorPasses: Seq[IRPass] = List(ComplexType, FunctionBinding) - override val invalidatedPasses: Seq[IRPass] = List( + override lazy val invalidatedPasses: Seq[IRPass] = List( AliasAnalysis, DataflowAnalysis, LambdaConsolidate, diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/Imports.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/Imports.scala index 7533fb3bc5..1d6b79cba4 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/Imports.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/Imports.scala @@ -18,10 +18,10 @@ case object Imports extends IRPass { override type Config = IRPass.Configuration.Default /** The passes that this pass depends _directly_ on to run. */ - override val precursorPasses: Seq[IRPass] = Seq() + override lazy val precursorPasses: Seq[IRPass] = Seq() /** The passes that are invalidated by running this pass. */ - override val invalidatedPasses: Seq[IRPass] = Seq() + override lazy val invalidatedPasses: Seq[IRPass] = Seq() val mainModuleName = Name.Literal( diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/LambdaShorthandToLambda.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/LambdaShorthandToLambda.scala index b82fe58f35..041c3fd59f 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/LambdaShorthandToLambda.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/LambdaShorthandToLambda.scala @@ -43,7 +43,7 @@ case object LambdaShorthandToLambda extends IRPass { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( ComplexType, DocumentationComments, FunctionBinding, @@ -51,7 +51,7 @@ case object LambdaShorthandToLambda extends IRPass { OperatorToFunction, SectionsToBinOp ) - override val invalidatedPasses: Seq[IRPass] = List( + override lazy val invalidatedPasses: Seq[IRPass] = List( AliasAnalysis, ApplicationSaturation, DataflowAnalysis, diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/NestedPatternMatch.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/NestedPatternMatch.scala index 12d69e35b1..432123b5f9 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/NestedPatternMatch.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/NestedPatternMatch.scala @@ -72,14 +72,14 @@ case object NestedPatternMatch extends IRPass { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( ComplexType, DocumentationComments, FunctionBinding, GenerateMethodBodies, LambdaShorthandToLambda ) - override val invalidatedPasses: Seq[IRPass] = List( + override lazy val invalidatedPasses: Seq[IRPass] = List( AliasAnalysis, DataflowAnalysis, DemandAnalysis, diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/OperatorToFunction.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/OperatorToFunction.scala index c7f4cf0d34..5b2e5a6d40 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/OperatorToFunction.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/OperatorToFunction.scala @@ -22,11 +22,11 @@ case object OperatorToFunction extends IRPass { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( GenerateMethodBodies, SectionsToBinOp ) - override val invalidatedPasses: Seq[IRPass] = List( + override lazy val invalidatedPasses: Seq[IRPass] = List( AliasAnalysis, DataflowAnalysis, DemandAnalysis diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/SectionsToBinOp.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/SectionsToBinOp.scala index 088b76d4f8..c29141f1f3 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/SectionsToBinOp.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/desugar/SectionsToBinOp.scala @@ -27,10 +27,10 @@ case object SectionsToBinOp extends IRPass { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( GenerateMethodBodies ) - override val invalidatedPasses: Seq[IRPass] = List( + override lazy val invalidatedPasses: Seq[IRPass] = List( AliasAnalysis, CachePreferenceAnalysis, DataflowAnalysis, diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/lint/ModuleNameConflicts.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/lint/ModuleNameConflicts.scala index c2b4149f35..6010e8841b 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/lint/ModuleNameConflicts.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/lint/ModuleNameConflicts.scala @@ -16,10 +16,10 @@ case object ModuleNameConflicts extends IRPass { override type Config = IRPass.Configuration.Default /** The passes that this pass depends _directly_ on to run. */ - override val precursorPasses: Seq[IRPass] = Seq(ComplexType) + override lazy val precursorPasses: Seq[IRPass] = Seq(ComplexType) /** The passes that are invalidated by running this pass. */ - override val invalidatedPasses: Seq[IRPass] = Seq() + override lazy val invalidatedPasses: Seq[IRPass] = Seq() /** Lints a module * diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/lint/NoSelfInStatic.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/lint/NoSelfInStatic.scala index e1b6ee6527..caebfe021d 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/lint/NoSelfInStatic.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/lint/NoSelfInStatic.scala @@ -23,10 +23,10 @@ object NoSelfInStatic extends IRPass { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = + override lazy val precursorPasses: Seq[IRPass] = Seq(GenerateMethodBodies) - override val invalidatedPasses: Seq[IRPass] = List() + override lazy val invalidatedPasses: Seq[IRPass] = List() override def runModule( ir: Module, diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/lint/ShadowedPatternFields.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/lint/ShadowedPatternFields.scala index 93b2de36e8..b785e3f774 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/lint/ShadowedPatternFields.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/lint/ShadowedPatternFields.scala @@ -33,10 +33,10 @@ case object ShadowedPatternFields extends IRPass { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( GenerateMethodBodies ) - override val invalidatedPasses: Seq[IRPass] = List( + override lazy val invalidatedPasses: Seq[IRPass] = List( AliasAnalysis, DataflowAnalysis, DemandAnalysis, diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/lint/UnusedBindings.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/lint/UnusedBindings.scala index b6fb0e8b51..3993d57885 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/lint/UnusedBindings.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/lint/UnusedBindings.scala @@ -30,7 +30,7 @@ case object UnusedBindings extends IRPass { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( ComplexType, GenerateMethodBodies, IgnoredBindings, @@ -40,7 +40,7 @@ case object UnusedBindings extends IRPass { OperatorToFunction, SectionsToBinOp ) - override val invalidatedPasses: Seq[IRPass] = List() + override lazy val invalidatedPasses: Seq[IRPass] = List() /** Lints a module. * diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/optimise/ApplicationSaturation.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/optimise/ApplicationSaturation.scala index 47835b5806..e86022d18d 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/optimise/ApplicationSaturation.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/optimise/ApplicationSaturation.scala @@ -27,7 +27,7 @@ case object ApplicationSaturation extends IRPass { override type Metadata = CallSaturation override type Config = Configuration - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( AliasAnalysis, ComplexType, FunctionBinding, @@ -38,7 +38,7 @@ case object ApplicationSaturation extends IRPass { OperatorToFunction, SectionsToBinOp ) - override val invalidatedPasses: Seq[IRPass] = List() + override lazy val invalidatedPasses: Seq[IRPass] = List() /** Executes the analysis pass, marking functions with information about their * argument saturation. diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/optimise/LambdaConsolidate.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/optimise/LambdaConsolidate.scala index 8b07c49014..b7593b470f 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/optimise/LambdaConsolidate.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/optimise/LambdaConsolidate.scala @@ -57,7 +57,7 @@ case object LambdaConsolidate extends IRPass { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( AliasAnalysis, ComplexType, FunctionBinding, @@ -67,7 +67,7 @@ case object LambdaConsolidate extends IRPass { OperatorToFunction, SectionsToBinOp ) - override val invalidatedPasses: Seq[IRPass] = List( + override lazy val invalidatedPasses: Seq[IRPass] = List( AliasAnalysis, DataflowAnalysis, DemandAnalysis, diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/optimise/UnreachableMatchBranches.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/optimise/UnreachableMatchBranches.scala index a8dbe1774c..f25b562468 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/optimise/UnreachableMatchBranches.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/optimise/UnreachableMatchBranches.scala @@ -46,14 +46,14 @@ case object UnreachableMatchBranches extends IRPass { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( ComplexType, DocumentationComments, FunctionBinding, GenerateMethodBodies, LambdaShorthandToLambda ) - override val invalidatedPasses: Seq[IRPass] = List( + override lazy val invalidatedPasses: Seq[IRPass] = List( AliasAnalysis, DataflowAnalysis, DemandAnalysis, diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/DocumentationComments.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/DocumentationComments.scala index 33a9e8a3b7..1a2c0de87a 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/DocumentationComments.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/DocumentationComments.scala @@ -36,8 +36,8 @@ case object DocumentationComments extends IRPass { override type Metadata = Doc override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = Seq() - override val invalidatedPasses: Seq[IRPass] = Seq( + override lazy val precursorPasses: Seq[IRPass] = Seq() + override lazy val invalidatedPasses: Seq[IRPass] = Seq( ComplexType, GenerateMethodBodies ) diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/ExpressionAnnotations.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/ExpressionAnnotations.scala index 3937fe4293..5a9bb83220 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/ExpressionAnnotations.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/ExpressionAnnotations.scala @@ -23,10 +23,10 @@ case object ExpressionAnnotations extends IRPass { override type Config = IRPass.Configuration.Default /** The passes that this pass depends _directly_ on to run. */ - override val precursorPasses: Seq[IRPass] = Seq(ModuleAnnotations) + override lazy val precursorPasses: Seq[IRPass] = Seq(ModuleAnnotations) /** The passes that are invalidated by running this pass. */ - override val invalidatedPasses: Seq[IRPass] = Seq(AliasAnalysis) + override lazy val invalidatedPasses: Seq[IRPass] = Seq(AliasAnalysis) /** Executes the pass on the provided `ir`, and returns a possibly transformed * or annotated version of `ir`. diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/FullyAppliedFunctionUses.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/FullyAppliedFunctionUses.scala index ada09a2f1d..991550d97f 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/FullyAppliedFunctionUses.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/FullyAppliedFunctionUses.scala @@ -16,9 +16,9 @@ object FullyAppliedFunctionUses extends IRPass { override type Metadata = BindingsMap.Resolution override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = + override lazy val precursorPasses: Seq[IRPass] = Seq(GlobalNames) - override val invalidatedPasses: Seq[IRPass] = Seq() + override lazy val invalidatedPasses: Seq[IRPass] = Seq() /** Executes the pass on the provided `ir`, and returns a possibly transformed * or annotated version of `ir`. diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/FullyQualifiedNames.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/FullyQualifiedNames.scala index aa70eea05b..9555372a3a 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/FullyQualifiedNames.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/FullyQualifiedNames.scala @@ -38,11 +38,11 @@ case object FullyQualifiedNames extends IRPass { override type Config = IRPass.Configuration.Default /** The passes that this pass depends _directly_ on to run. */ - override val precursorPasses: Seq[IRPass] = + override lazy val precursorPasses: Seq[IRPass] = Seq(AliasAnalysis, BindingAnalysis) /** The passes that are invalidated by running this pass. */ - override val invalidatedPasses: Seq[IRPass] = Nil + override lazy val invalidatedPasses: Seq[IRPass] = Nil /** Executes the pass on the provided `ir`, and returns a possibly transformed * or annotated version of `ir`. diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/GenericAnnotations.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/GenericAnnotations.scala index abbb3932e8..8b4e4d04a0 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/GenericAnnotations.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/GenericAnnotations.scala @@ -24,8 +24,8 @@ import org.enso.compiler.pass.IRPass case object GenericAnnotations extends IRPass { override type Metadata = ModuleAnnotations.Annotations override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = Seq() - override val invalidatedPasses: Seq[IRPass] = Seq() + override lazy val precursorPasses: Seq[IRPass] = Seq() + override lazy val invalidatedPasses: Seq[IRPass] = Seq() /** Resolves annotations. * diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/GlobalNames.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/GlobalNames.scala index fcd92924af..b019dca4d9 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/GlobalNames.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/GlobalNames.scala @@ -46,11 +46,11 @@ case object GlobalNames extends IRPass { override type Config = IRPass.Configuration.Default /** The passes that this pass depends _directly_ on to run. */ - override val precursorPasses: Seq[IRPass] = + override lazy val precursorPasses: Seq[IRPass] = Seq(AliasAnalysis, BindingAnalysis, FullyQualifiedNames) /** The passes that are invalidated by running this pass. */ - override val invalidatedPasses: Seq[IRPass] = Seq(AliasAnalysis) + override lazy val invalidatedPasses: Seq[IRPass] = Seq(AliasAnalysis) /** Executes the pass on the provided `ir`, and returns a possibly transformed * or annotated version of `ir`. diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/IgnoredBindings.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/IgnoredBindings.scala index 167c5daf47..8c7ac841cf 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/IgnoredBindings.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/IgnoredBindings.scala @@ -41,13 +41,13 @@ case object IgnoredBindings extends IRPass { override type Metadata = State override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( ComplexType, GenerateMethodBodies, LambdaShorthandToLambda, NestedPatternMatch ) - override val invalidatedPasses: Seq[IRPass] = List( + override lazy val invalidatedPasses: Seq[IRPass] = List( AliasAnalysis, DataflowAnalysis, DemandAnalysis, diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/MethodCalls.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/MethodCalls.scala index 658044ecc2..ae04fd9c37 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/MethodCalls.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/MethodCalls.scala @@ -18,9 +18,9 @@ object MethodCalls extends IRPass { override type Metadata = BindingsMap.Resolution override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = + override lazy val precursorPasses: Seq[IRPass] = Seq(BindingAnalysis, GlobalNames) - override val invalidatedPasses: Seq[IRPass] = Seq() + override lazy val invalidatedPasses: Seq[IRPass] = Seq() /** Executes the pass on the provided `ir`, and returns a possibly transformed * or annotated version of `ir`. diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/MethodDefinitions.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/MethodDefinitions.scala index 39051dadd9..e6541ffee4 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/MethodDefinitions.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/MethodDefinitions.scala @@ -31,10 +31,10 @@ case object MethodDefinitions extends IRPass { override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = + override lazy val precursorPasses: Seq[IRPass] = List(ComplexType, FunctionBinding, GenerateMethodBodies, BindingAnalysis) - override val invalidatedPasses: Seq[IRPass] = List() + override lazy val invalidatedPasses: Seq[IRPass] = List() /** Executes the pass on the provided `ir`, and returns a possibly transformed * or annotated version of `ir`. diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/ModuleAnnotations.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/ModuleAnnotations.scala index 6e5e56acf6..f936cd73eb 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/ModuleAnnotations.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/ModuleAnnotations.scala @@ -19,8 +19,8 @@ import org.enso.compiler.pass.desugar.{ case object ModuleAnnotations extends IRPass { override type Metadata = Annotations override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = Seq() - override val invalidatedPasses: Seq[IRPass] = Seq( + override lazy val precursorPasses: Seq[IRPass] = Seq() + override lazy val invalidatedPasses: Seq[IRPass] = Seq( DocumentationComments, ComplexType, FunctionBinding, diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/OverloadsResolution.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/OverloadsResolution.scala index e0edd1d61a..4e499d533f 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/OverloadsResolution.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/OverloadsResolution.scala @@ -32,11 +32,11 @@ case object OverloadsResolution extends IRPass { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( ComplexType, GenerateMethodBodies ) - override val invalidatedPasses: Seq[IRPass] = List() + override lazy val invalidatedPasses: Seq[IRPass] = List() /** Performs static detection of method overloads within a given module. * diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/Patterns.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/Patterns.scala index b90893311b..6a9addcf3d 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/Patterns.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/Patterns.scala @@ -19,9 +19,9 @@ object Patterns extends IRPass { override type Metadata = BindingsMap.Resolution override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = + override lazy val precursorPasses: Seq[IRPass] = Seq(NestedPatternMatch, GenerateMethodBodies, BindingAnalysis) - override val invalidatedPasses: Seq[IRPass] = Seq(AliasAnalysis) + override lazy val invalidatedPasses: Seq[IRPass] = Seq(AliasAnalysis) /** Executes the pass on the provided `ir`, and returns a possibly transformed * or annotated version of `ir`. diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/SuspendedArguments.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/SuspendedArguments.scala index 534dd37779..60fe4d3418 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/SuspendedArguments.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/SuspendedArguments.scala @@ -50,12 +50,12 @@ case object SuspendedArguments extends IRPass { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( ComplexType, TypeSignatures, LambdaConsolidate ) - override val invalidatedPasses: Seq[IRPass] = List( + override lazy val invalidatedPasses: Seq[IRPass] = List( AliasAnalysis, CachePreferenceAnalysis, DataflowAnalysis, diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/TypeFunctions.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/TypeFunctions.scala index 20eabdf714..989dad39e3 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/TypeFunctions.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/TypeFunctions.scala @@ -37,14 +37,14 @@ case object TypeFunctions extends IRPass { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( IgnoredBindings, LambdaShorthandToLambda, OperatorToFunction, SectionsToBinOp ) - override val invalidatedPasses: Seq[IRPass] = List( + override lazy val invalidatedPasses: Seq[IRPass] = List( AliasAnalysis, CachePreferenceAnalysis, DataflowAnalysis, diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/TypeNames.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/TypeNames.scala index 4dc06a406d..ebcedd76e5 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/TypeNames.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/TypeNames.scala @@ -24,11 +24,11 @@ case object TypeNames extends IRPass { override type Config = IRPass.Configuration.Default /** The passes that this pass depends _directly_ on to run. */ - override val precursorPasses: Seq[IRPass] = + override lazy val precursorPasses: Seq[IRPass] = Seq(BindingAnalysis) /** The passes that are invalidated by running this pass. */ - override val invalidatedPasses: Seq[IRPass] = Seq() + override lazy val invalidatedPasses: Seq[IRPass] = Seq() /** Executes the pass on the provided `ir`, and returns a possibly transformed * or annotated version of `ir`. diff --git a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/TypeSignatures.scala b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/TypeSignatures.scala index 6c88743eeb..ed634cc4f7 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/TypeSignatures.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/pass/resolve/TypeSignatures.scala @@ -33,11 +33,11 @@ case object TypeSignatures extends IRPass { override type Metadata = Signature override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List( + override lazy val precursorPasses: Seq[IRPass] = List( TypeFunctions, ModuleAnnotations ) - override val invalidatedPasses: Seq[IRPass] = List( + override lazy val invalidatedPasses: Seq[IRPass] = List( AliasAnalysis, CachePreferenceAnalysis, DataflowAnalysis, diff --git a/engine/runtime/src/test/scala/org/enso/compiler/test/PassesTest.scala b/engine/runtime/src/test/scala/org/enso/compiler/test/PassesTest.scala index d4bdc9e887..488a6cc417 100644 --- a/engine/runtime/src/test/scala/org/enso/compiler/test/PassesTest.scala +++ b/engine/runtime/src/test/scala/org/enso/compiler/test/PassesTest.scala @@ -24,8 +24,8 @@ class PassesTest extends CompilerTest { override type Metadata = IRPass.Metadata.Empty override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List() - override val invalidatedPasses: Seq[IRPass] = List() + override lazy val precursorPasses: Seq[IRPass] = List() + override lazy val invalidatedPasses: Seq[IRPass] = List() override def runModule( ir: Module, diff --git a/engine/runtime/src/test/scala/org/enso/compiler/test/core/ir/MetadataStorageTest.scala b/engine/runtime/src/test/scala/org/enso/compiler/test/core/ir/MetadataStorageTest.scala index 4f8299109d..007a7a6e07 100644 --- a/engine/runtime/src/test/scala/org/enso/compiler/test/core/ir/MetadataStorageTest.scala +++ b/engine/runtime/src/test/scala/org/enso/compiler/test/core/ir/MetadataStorageTest.scala @@ -18,8 +18,8 @@ class MetadataStorageTest extends CompilerTest { override type Metadata = Metadata1 override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List() - override val invalidatedPasses: Seq[IRPass] = List() + override lazy val precursorPasses: Seq[IRPass] = List() + override lazy val invalidatedPasses: Seq[IRPass] = List() override def runModule( ir: Module, @@ -50,8 +50,8 @@ class MetadataStorageTest extends CompilerTest { override type Metadata = Metadata2 override type Config = IRPass.Configuration.Default - override val precursorPasses: Seq[IRPass] = List() - override val invalidatedPasses: Seq[IRPass] = List() + override lazy val precursorPasses: Seq[IRPass] = List() + override lazy val invalidatedPasses: Seq[IRPass] = List() override def runModule( ir: Module, diff --git a/engine/runtime/src/test/scala/org/enso/compiler/test/pass/PassConfigurationTest.scala b/engine/runtime/src/test/scala/org/enso/compiler/test/pass/PassConfigurationTest.scala index daa53194c0..cfde54cb95 100644 --- a/engine/runtime/src/test/scala/org/enso/compiler/test/pass/PassConfigurationTest.scala +++ b/engine/runtime/src/test/scala/org/enso/compiler/test/pass/PassConfigurationTest.scala @@ -16,8 +16,8 @@ class PassConfigurationTest extends CompilerTest { override type Metadata = IRPass.Metadata.Empty override type Config = Configuration1 - override val precursorPasses: Seq[IRPass] = List() - override val invalidatedPasses: Seq[IRPass] = List() + override lazy val precursorPasses: Seq[IRPass] = List() + override lazy val invalidatedPasses: Seq[IRPass] = List() override def runModule( ir: Module, @@ -38,8 +38,8 @@ class PassConfigurationTest extends CompilerTest { override type Metadata = IRPass.Metadata.Empty override type Config = Configuration2 - override val precursorPasses: Seq[IRPass] = List() - override val invalidatedPasses: Seq[IRPass] = List() + override lazy val precursorPasses: Seq[IRPass] = List() + override lazy val invalidatedPasses: Seq[IRPass] = List() override def runModule( ir: Module,