Beispiel #1
0
        public void CacheSystemImplementation(
			int ArgumentCount, 
			String Header,
			Func<VirtualMachine.ExecutionContext, List<Object>, Object> Implementation)
        {
            CachedLambda = new VirtualMachine.NativeFunction(Header, ArgumentCount, Implementation);
        }
Beispiel #2
0
        public VirtualMachine.InvokeableFunction GetBasicInvokable(int ArgumentCount)
        {
            if (CachedLambda == null)
            {
                if (Instructions == null) throw new InvalidOperationException("Instructions were not emitted");
                CachedLambda = VirtualMachine.LambdaFunction.CreateLambda(Name, GetCleanupPoint(), GetEntryPoint(), ArgumentCount);
            }

            return CachedLambda;
        }
Beispiel #3
0
 public SystemVariable(String Name, Func<VirtualMachine.ExecutionContext, Object> Implementation, String Typename)
 {
     this.Implementation = new VirtualMachine.NativeFunction("[sys-variable] " + Name, (c, l) => Implementation(c));
     this.StorageMethod = VariableStorageMethod.System;
     this.DeclaredTypeName = Typename;
     this.Name = Name;
 }