Beispiel #1
0
 public ExecutableFunction(ExecutionTarget target, BytecodeInterpreter.ExecutionContext context, IRuntimeEntityIdentity runtimeIdentity)
 {
     CreatedDate     = DateTime.Now;
     ExecutionTarget = target;
     CompiledName    = runtimeIdentity.EditorName;
     RuntimeName     = runtimeIdentity.RuntimeName;
     _context        = context;
 }
        private void HandleDeploymentStarting(IBuiltPackage topLevelPackage)
        {
            var executionServices = new HostExecutionServices(_executionTarget.Host);

            if (!RebarFeatureToggles.IsLLVMCompilerEnabled)
            {
                _bytecodeInterpreterExecutionContext = new BytecodeInterpreter.ExecutionContext(executionServices);
            }
            else
            {
                _llvmExecutionContext = new LLVM.ExecutionContext(executionServices);
            }
        }
Beispiel #3
0
 public static FunctionDeployedPackage DeployFunction(FunctionBuiltPackage builtPackage, ExecutionTarget target, ExecutionContext context)
 {
     context.LoadFunction(builtPackage.Function);
     return(new FunctionDeployedPackage(builtPackage.RuntimeEntityIdentity, target, context));
 }
Beispiel #4
0
 private FunctionDeployedPackage(IRuntimeEntityIdentity identity, ExecutionTarget executionTarget, ExecutionContext context)
 {
     DeployedPackageIdentity = identity;
     Executable = new ExecutableFunction(executionTarget, context, identity);
 }