Ejemplo n.º 1
0
        public RuntimeCore(Heap heap)
        {
            // The heap is initialized by the core and is used to allocate strings
            // Use the that heap for runtime
            Validity.Assert(heap != null);
            this.Heap     = heap;
            RuntimeMemory = new RuntimeMemory(Heap);

            InterpreterProps  = new Stack <InterpreterProperties>();
            ReplicationGuides = new List <List <ReplicationGuide> >();

            RunningBlock              = 0;
            ExecutionState            = (int)ExecutionStateEventArgs.State.kInvalid; //not yet started
            FFIPropertyChangedMonitor = new FFIPropertyChangedMonitor(this);

            ContinuationStruct = new ContinuationStructure();


            watchStack        = new List <StackValue>();
            watchFramePointer = Constants.kInvalidIndex;
            WatchSymbolList   = new List <SymbolNode>();

            FunctionCallDepth   = 0;
            cancellationPending = false;

            watchClassScope = Constants.kInvalidIndex;

            ExecutionInstance = CurrentExecutive = new Executive(this);
            ExecutiveProvider = new ExecutiveProvider();

            RuntimeStatus = new ProtoCore.RuntimeStatus(this);
            StartPC       = Constants.kInvalidPC;
            RuntimeData   = new ProtoCore.RuntimeData();
        }
Ejemplo n.º 2
0
        public RuntimeCore(Heap heap, Options options = null)
        {
            // The heap is initialized by the core and is used to allocate strings
            // Use the that heap for runtime
            Validity.Assert(heap != null);
            this.Heap = heap;
            RuntimeMemory = new RuntimeMemory(Heap);

            this.Options = options;

            InterpreterProps = new Stack<InterpreterProperties>();
            ReplicationGuides = new List<List<ReplicationGuide>>();

            RunningBlock = 0;
            ExecutionState = (int)ExecutionStateEventArgs.State.kInvalid; //not yet started
            FFIPropertyChangedMonitor = new FFIPropertyChangedMonitor(this);

            ContinuationStruct = new ContinuationStructure();


            watchStack = new List<StackValue>();
            watchFramePointer = Constants.kInvalidIndex;
            WatchSymbolList = new List<SymbolNode>();

            FunctionCallDepth = 0;
            cancellationPending = false;

            watchClassScope = Constants.kInvalidIndex;

            ExecutionInstance = CurrentExecutive = new Executive(this);
            ExecutiveProvider = new ExecutiveProvider();

            RuntimeStatus = new ProtoCore.RuntimeStatus(this);
            StartPC = Constants.kInvalidPC;
            RuntimeData = new ProtoCore.RuntimeData();
        }