Search in sources :

Example 1 with InstantiationContext

use of org.finos.legend.pure.runtime.java.interpreted.natives.core.InstantiationContext in project legend-pure by finos.

the class FunctionExecutionInterpreted method start.

@Override
public CoreInstance start(CoreInstance function, ListIterable<? extends CoreInstance> arguments) {
    this.cancelExecution.set(false);
    Exception isException = null;
    ExecutionSupport executionSupport = new ExecutionSupport();
    try {
        CoreInstance result = this.executeFunction(false, FunctionCoreInstanceWrapper.toFunction(function), arguments, new Stack<MutableMap<String, CoreInstance>>(), new Stack<MutableMap<String, CoreInstance>>(), VariableContext.newVariableContext(), null, VoidProfiler.VOID_PROFILER, new InstantiationContext(), executionSupport);
        return result;
    } catch (Exception ex) {
        isException = ex;
        throw ex;
    } finally {
        executionSupport.executionEnd(isException);
    }
}
Also used : InstantiationContext(org.finos.legend.pure.runtime.java.interpreted.natives.core.InstantiationContext) CoreInstance(org.finos.legend.pure.m4.coreinstance.CoreInstance) MutableMap(org.eclipse.collections.api.map.MutableMap) PureAssertFailException(org.finos.legend.pure.m3.exception.PureAssertFailException) VariableNameConflictException(org.finos.legend.pure.runtime.java.interpreted.VariableContext.VariableNameConflictException) PureExecutionException(org.finos.legend.pure.m3.exception.PureExecutionException) IOException(java.io.IOException) PureException(org.finos.legend.pure.m4.exception.PureException)

Aggregations

IOException (java.io.IOException)1 MutableMap (org.eclipse.collections.api.map.MutableMap)1 PureAssertFailException (org.finos.legend.pure.m3.exception.PureAssertFailException)1 PureExecutionException (org.finos.legend.pure.m3.exception.PureExecutionException)1 CoreInstance (org.finos.legend.pure.m4.coreinstance.CoreInstance)1 PureException (org.finos.legend.pure.m4.exception.PureException)1 VariableNameConflictException (org.finos.legend.pure.runtime.java.interpreted.VariableContext.VariableNameConflictException)1 InstantiationContext (org.finos.legend.pure.runtime.java.interpreted.natives.core.InstantiationContext)1