diff --git a/runtime/benchmark/src/main/java/mb/spoofax/runtime/benchmark/state/ObservingExecState.java b/runtime/benchmark/src/main/java/mb/spoofax/runtime/benchmark/state/ObservingExecState.java index 2b2c0d87a..4b239c85f 100644 --- a/runtime/benchmark/src/main/java/mb/spoofax/runtime/benchmark/state/ObservingExecState.java +++ b/runtime/benchmark/src/main/java/mb/spoofax/runtime/benchmark/state/ObservingExecState.java @@ -3,6 +3,7 @@ import kotlin.Unit; import mb.pie.runtime.core.ExecException; import mb.pie.runtime.core.FuncApp; +import mb.pie.runtime.core.exec.ExecutionVariant; import mb.pie.runtime.core.exec.ObservingExecutor; import mb.pie.runtime.core.impl.exec.ObservingExecutorImpl; import mb.spoofax.runtime.pie.builder.SpoofaxPipeline; @@ -40,7 +41,8 @@ public void exec(WorkspaceState workspaceState, List changedPaths) { private void init(SpoofaxPieState spoofaxPieState, WorkspaceState workspaceState, InfraState infraState) { this.executor = - new ObservingExecutorImpl(infraState.store, infraState.cache, infraState.share, infraState.layer, + new ObservingExecutorImpl(infraState.store, infraState.cache, ExecutionVariant.Naive, infraState.share, + infraState.layer, infraState.logger, spoofaxPieState.logger, infraState.funcs); final PPath root = workspaceState.root; try(final Stream stream = root.list(PPaths.directoryPathMatcher())) { diff --git a/runtime/eclipse/src/main/java/mb/spoofax/runtime/eclipse/pipeline/ObservingPipelineAdapter.java b/runtime/eclipse/src/main/java/mb/spoofax/runtime/eclipse/pipeline/ObservingPipelineAdapter.java index 00844bb2f..2ae2570d4 100644 --- a/runtime/eclipse/src/main/java/mb/spoofax/runtime/eclipse/pipeline/ObservingPipelineAdapter.java +++ b/runtime/eclipse/src/main/java/mb/spoofax/runtime/eclipse/pipeline/ObservingPipelineAdapter.java @@ -19,6 +19,7 @@ import mb.log.Logger; import mb.pie.runtime.core.ExecException; import mb.pie.runtime.core.FuncApp; +import mb.pie.runtime.core.exec.ExecutionVariant; import mb.pie.runtime.core.exec.ObservingExecutor; import mb.spoofax.runtime.eclipse.SpoofaxPlugin; import mb.spoofax.runtime.eclipse.editor.SpoofaxEditor; @@ -58,7 +59,7 @@ public class ObservingPipelineAdapter implements PipelineAdapter { this.eclipseRoot = ResourcesPlugin.getWorkspace().getRoot(); this.root = pathSrv.resolve(eclipseRoot); - this.executor = pieSrv.getObservingExecutor(root, SpoofaxPlugin.useInMemoryStore); + this.executor = pieSrv.getObservingExecutor(root, SpoofaxPlugin.useInMemoryStore, ExecutionVariant.DirtyFlagging); } diff --git a/runtime/pie/src/main/kotlin/mb/spoofax/runtime/pie/Service.kt b/runtime/pie/src/main/kotlin/mb/spoofax/runtime/pie/Service.kt index 624daead3..2f582ef0b 100644 --- a/runtime/pie/src/main/kotlin/mb/spoofax/runtime/pie/Service.kt +++ b/runtime/pie/src/main/kotlin/mb/spoofax/runtime/pie/Service.kt @@ -15,7 +15,7 @@ import java.util.concurrent.ConcurrentHashMap interface PieSrv { fun getPullingExecutor(dir: PPath, useInMemoryStore: Boolean): PullingExecutor fun getDirtyFlaggingExecutor(dir: PPath, useInMemoryStore: Boolean): DirtyFlaggingExecutor - fun getObservingExecutor(dir: PPath, useInMemoryStore: Boolean): ObservingExecutor + fun getObservingExecutor(dir: PPath, useInMemoryStore: Boolean, executionVariant: ExecutionVariant = ExecutionVariant.Naive): ObservingExecutor } class PieSrvImpl @Inject constructor( @@ -49,11 +49,11 @@ class PieSrvImpl @Inject constructor( } } - override fun getObservingExecutor(dir: PPath, useInMemoryStore: Boolean): ObservingExecutor { + override fun getObservingExecutor(dir: PPath, useInMemoryStore: Boolean, executionVariant: ExecutionVariant): ObservingExecutor { return observingExecutors.getOrPut(dir) { val store = getStore(dir, useInMemoryStore) val cache = getCache(dir) - observingExecutorFactory.create(store, cache) + observingExecutorFactory.create(store, cache, executionVariant) } }