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

            if (_llvmExecutionContext != null)
            {
                _llvmExecutionContext.Dispose();
            }
            _llvmExecutionContext = new LLVM.ExecutionContext(executionServices);
        }
        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);
            }
        }
示例#4
0
 public ExecutableFunction(
     ExecutionTarget target,
     LLVM.ExecutionContext context,
     IRuntimeEntityIdentity runtimeIdentity,
     bool isAsync)
 {
     CreatedDate     = DateTime.Now;
     ExecutionTarget = target;
     CompiledName    = runtimeIdentity.EditorName;
     RuntimeName     = FunctionCompileHandler.FunctionLLVMName(runtimeIdentity.EditorName);
     _llvmContext    = context;
     IsAsync         = isAsync;
 }
示例#5
0
 public override Task UnloadAllAsync()
 {
     _llvmExecutionContext.Dispose();
     _llvmExecutionContext = null;
     return(Task.CompletedTask);
 }