示例#1
0
 public static TrueLambdaFunction CreateTrueLambda(ExecutionLocation Source, RuntimeScriptObject CapturedVariables)
 {
     return new TrueLambdaFunction
     {
         CapturedVariables = CapturedVariables,
         Source = Source
     };
 }
示例#2
0
 internal ExecutionContext(Dictionary<int,Object> StaticVariables, List<Type> Types, ExecutionLocation ExecutionPoint)
 {
     this.StaticVariables = StaticVariables;
     this.Types = Types;
     Stack.Add(new ExecutionLocation(new InstructionList(), 0)); //Fake return point
     R = null;
     ExecutionState = ExecutionState.Running;
     CurrentInstruction = ExecutionPoint;
 }
示例#3
0
 public static LambdaFunction CreateLambda(String Name, ExecutionLocation CleanupPoint, ExecutionLocation EntryPoint, int ArgumentCount)
 {
     var r = new LambdaFunction();
     r.CleanupPoint = CleanupPoint;
     r.EntryPoint = EntryPoint;
     r.ArgumentCount = ArgumentCount;
     r.Name = Name;
     return r;
 }
示例#4
0
 public ErrorHandler(ExecutionLocation HandlerCode)
 {
     this.HandlerCode = HandlerCode;
 }
示例#5
0
 public static bool AreEqual(ExecutionLocation A, ExecutionLocation B)
 {
     return Object.ReferenceEquals(A.Code, B.Code) && A.InstructionPointer == B.InstructionPointer;
 }