Module aya.cli.impl

Class InMemoryCompilerAdvisor

java.lang.Object
org.aya.cli.library.incremental.InMemoryCompilerAdvisor
All Implemented Interfaces:
CompilerAdvisor

public class InMemoryCompilerAdvisor extends Object implements CompilerAdvisor
  • Field Details

    • coreTimestamp

      @NotNull protected final @NotNull kala.collection.mutable.MutableMap<Path,FileTime> coreTimestamp
    • compiledCore

      @NotNull protected final @NotNull kala.collection.mutable.MutableMap<kala.collection.immutable.ImmutableSeq<String>,org.aya.resolve.ResolveInfo> compiledCore
  • Constructor Details

    • InMemoryCompilerAdvisor

      public InMemoryCompilerAdvisor()
  • Method Details

    • timestampKey

      @NotNull protected @NotNull Path timestampKey(@NotNull @NotNull LibrarySource source)
    • isSourceModified

      public boolean isSourceModified(@NotNull @NotNull LibrarySource source)
      Specified by:
      isSourceModified in interface CompilerAdvisor
    • updateLastModified

      public void updateLastModified(@NotNull @NotNull LibrarySource source)
      Specified by:
      updateLastModified in interface CompilerAdvisor
    • prepareLibraryOutput

      public void prepareLibraryOutput(@NotNull @NotNull LibraryOwner owner)
      Specified by:
      prepareLibraryOutput in interface CompilerAdvisor
    • clearLibraryOutput

      public void clearLibraryOutput(@NotNull @NotNull LibraryOwner owner)
      Specified by:
      clearLibraryOutput in interface CompilerAdvisor
    • clearModuleOutput

      public void clearModuleOutput(@NotNull @NotNull LibrarySource source)
      Specified by:
      clearModuleOutput in interface CompilerAdvisor
    • doLoadCompiledCore

      @Nullable public @Nullable org.aya.resolve.ResolveInfo doLoadCompiledCore(@NotNull org.aya.core.serde.SerTerm.DeState deState, @NotNull @NotNull org.aya.util.reporter.Reporter reporter, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<String> mod, @Nullable @Nullable Path sourcePath, @Nullable @Nullable Path corePath, @NotNull @NotNull org.aya.resolve.module.ModuleLoader recurseLoader)
      Description copied from interface: CompilerAdvisor
      Try to load the compiled core. For DiskCompilerAdvisor, returns null if the core path does not exist or either source or core path is null. For InMemoryCompilerAdvisor, returns null if the mod does not store in memory.
      Specified by:
      doLoadCompiledCore in interface CompilerAdvisor
    • doSaveCompiledCore

      public void doSaveCompiledCore(@NotNull org.aya.core.serde.Serializer.State serState, @NotNull @NotNull LibrarySource file, @NotNull @NotNull org.aya.resolve.ResolveInfo resolveInfo, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<org.aya.core.def.GenericDef> defs)
      Specified by:
      doSaveCompiledCore in interface CompilerAdvisor