示例#1
0
        public void LoadFunction(ContextFreeModule contextFreeModule)
        {
            Module functionModule = _contextWrapper.LoadContextFreeModule(contextFreeModule);

            functionModule.VerifyAndThrowIfInvalid();
            _globalModule.LinkInModule(functionModule.Clone());
        }
示例#2
0
        private static ContextFreeModule LoadModuleAndRegisterFunctionNames(string modulePath, IEnumerable <string> functionNames)
        {
            var contextFreeModule = new ContextFreeModule(File.ReadAllBytes(modulePath));

            foreach (string name in functionNames)
            {
                FunctionOwners[name] = contextFreeModule;
            }
            return(contextFreeModule);
        }
示例#3
0
 public FunctionBuiltPackage(
     CompileSpecification identity,
     QualifiedName targetIdentity,
     CompileSpecification[] dependencyIdentities,
     ContextFreeModule module,
     bool isYielding)
 {
     Version = CurrentVersion;
     RuntimeEntityIdentity = identity;
     TargetIdentity        = targetIdentity;
     DependencyIdentities  = dependencyIdentities;
     Module     = module;
     IsYielding = isYielding;
 }
示例#4
0
 public FunctionCompileResult(ContextFreeModule module, bool isYielding, bool mayPanic)
 {
     Module     = module;
     IsYielding = isYielding;
     MayPanic   = mayPanic;
 }
示例#5
0
 public Module LoadContextFreeModule(ContextFreeModule contextFreeModule)
 {
     return(contextFreeModule.LoadModuleInContext(_context));
 }