public void CacheSystemImplementation( int ArgumentCount, String Header, Func<VirtualMachine.ExecutionContext, List<Object>, Object> Implementation) { CachedLambda = new VirtualMachine.NativeFunction(Header, ArgumentCount, Implementation); }
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; }
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; }