diff --git a/engine/runtime-compiler/src/main/java/org/enso/compiler/pass/analyse/PassPersistance.java b/engine/runtime-compiler/src/main/java/org/enso/compiler/pass/analyse/PassPersistance.java index e3a0875a743..bd939c45c53 100644 --- a/engine/runtime-compiler/src/main/java/org/enso/compiler/pass/analyse/PassPersistance.java +++ b/engine/runtime-compiler/src/main/java/org/enso/compiler/pass/analyse/PassPersistance.java @@ -146,7 +146,7 @@ public final class PassPersistance { @org.openide.util.lookup.ServiceProvider(service = Persistance.class) public static final class PersistAliasAnalysisGraph extends Persistance { public PersistAliasAnalysisGraph() { - super(Graph.class, false, 1119); + super(Graph.class, false, 1131); } @SuppressWarnings("unchecked") @@ -160,6 +160,10 @@ public final class PassPersistance { var links = (scala.collection.immutable.Set) in.readInline(scala.collection.immutable.Set.class); g.links_$eq(links); + + var nextIdCounter = in.readInt(); + g.nextIdCounter_$eq(nextIdCounter); + return g; } @@ -168,6 +172,7 @@ public final class PassPersistance { protected void writeObject(Graph obj, Output out) throws IOException { out.writeObject(obj.rootScope()); out.writeInline(scala.collection.immutable.Set.class, obj.links()); + out.writeInt(obj.nextIdCounter()); } private static void assignParents(AliasAnalysis$Graph$Scope scope) { diff --git a/engine/runtime-compiler/src/main/scala/org/enso/compiler/pass/analyse/AliasAnalysis.scala b/engine/runtime-compiler/src/main/scala/org/enso/compiler/pass/analyse/AliasAnalysis.scala index 09867bb90e8..0f89ae6e4b9 100644 --- a/engine/runtime-compiler/src/main/scala/org/enso/compiler/pass/analyse/AliasAnalysis.scala +++ b/engine/runtime-compiler/src/main/scala/org/enso/compiler/pass/analyse/AliasAnalysis.scala @@ -69,7 +69,7 @@ import scala.reflect.ClassTag * * - A [[org.enso.compiler.pass.PassConfiguration]] containing an instance of * [[AliasAnalysis.Configuration]]. - * - A [[LocalScope]], where relevant. + * - A [[org.enso.compiler.context.LocalScope]], where relevant. */ case object AliasAnalysis extends IRPass { @@ -940,11 +940,10 @@ case object AliasAnalysis extends IRPass { sealed class Graph extends Serializable { var rootScope: Graph.Scope = new Graph.Scope() var links: Set[Graph.Link] = Set() + var nextIdCounter = 0 private var globalSymbols: Map[Graph.Symbol, Occurrence.Global] = Map() - private var nextIdCounter = 0 - /** @return a deep structural copy of `this` */ def deepCopy( scope_mapping: mutable.Map[Scope, Scope] = mutable.Map()