Commit 0fdbc601 authored by Nico Mack's avatar Nico Mack

Added support for pre-compiling executors

parent d96e0e80
......@@ -310,6 +310,10 @@ public class Equation {
public synchronized void evaluate() {
Preconditions.checkState(scriptExecutor != null);
if (scriptExecutor.isCompilable()) {
scriptExecutor.compile(script);
}
for (Declaration declaration : lockedMapping.getIndependentVariables()) {
scriptExecutor.set(declaration);
}
......
......@@ -117,6 +117,18 @@ public abstract class Executor {
// ---------------------------------------------------------------------------
public boolean isCompilable() {
return false;
}
// ---------------------------------------------------------------------------
public boolean compile(String script) {
return false;
}
// ---------------------------------------------------------------------------
abstract public void set(Declaration declaration);
// ---------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment