Esempio n. 1
0
        /// <summary>
        /// Create a mirror for a given executive
        /// </summary>
        /// <param name="exec"></param>
        public ExecutionMirror(ProtoCore.DSASM.Executive exec, ProtoCore.RuntimeCore coreObj)
        {
            Validity.Assert(exec != null, "Can't mirror a null executive");

            runtimeCore = coreObj;
            MirrorTarget = exec;
        }
Esempio n. 2
0
        /// <summary>
        /// Setup to run with customised launch options
        /// </summary>
        /// <returns>Ready to run?</returns>
        /// 
        private bool _PreStart(string code, string fileName)
        {
            this.code = code;
            if (null == core)
            {
                core = new ProtoCore.Core(new ProtoCore.Options { IDEDebugMode = true });
                core.Compilers.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Compiler(core));
                core.Compilers.Add(ProtoCore.Language.kImperative, new ProtoImperative.Compiler(core));

            }


            if (null != fileName)
            {
                core.CurrentDSFileName = Path.GetFullPath(fileName);
                core.Options.RootModulePathName = Path.GetFullPath(fileName);
            }

            //Run the compilation process
            if (Compile(out resumeBlockID))
            {
                inited = true;
                runtimeCore = CreateRuntimeCore(core);

                FirstExec();
                diList = BuildReverseIndex();
                return true;
            }
            else
            {
                inited = false;
                return false;
            }
        }
Esempio n. 3
0
        public virtual void Setup()
        {
            core = new ProtoCore.Core(new ProtoCore.Options());
            core.Compilers.Add(ProtoCore.Language.Associative, new ProtoAssociative.Compiler(core));
            core.Compilers.Add(ProtoCore.Language.Imperative, new ProtoImperative.Compiler(core));

            // This is set when a test is executed 
            runtimeCore = null;
        }
Esempio n. 4
0
 protected MirrorObject(ProtoCore.RuntimeCore runtimeCore, ProtoCore.Core staticCore = null)
 {
     this.runtimeCore = runtimeCore;
     MirrorObject.staticCore = staticCore;
 }
 private ProtoCore.RuntimeCore CreateRuntimeCore(ProtoCore.Core core)
 {
     ProtoCore.RuntimeCore runtimeCore = new ProtoCore.RuntimeCore(core.Heap);
     runtimeCore.SetupForExecution(core, core.GlobOffset);
     return runtimeCore;
 }
Esempio n. 6
0
 /// <summary>
 /// Takes a runtime core object to read runtime data
 /// </summary>
 /// <param name="sv"></param>
 public MirrorData(ProtoCore.Core core, ProtoCore.RuntimeCore runtimeCore, StackValue sv)
 {
     this.core = core;
     this.runtimeCore = runtimeCore;
     svData = sv;
 }
Esempio n. 7
0
 public ProtoVMState(ProtoCore.Core core, ProtoCore.RuntimeCore runtimeCore)
 {
     this.core = core;
     this.runtimeCore = runtimeCore;
 }
Esempio n. 8
0
        public RuntimeStatus(RuntimeCore runtimeCore,
                             bool warningAsError = false,
                             System.IO.TextWriter writer = null)
        {
            warnings = new List<Runtime.WarningEntry>();
            this.runtimeCore = runtimeCore;

            if (writer != null)
            {
                System.Console.SetOut(writer);
            }
        }
 public ExpressionInterpreterRunner(ProtoCore.Core core, ProtoCore.RuntimeCore runtimeCore)
 {
     Core = core;
     this.runtimeCore = runtimeCore;
 }
Esempio n. 10
0
 private WatchViewModel ProcessThing(double value, ProtoCore.RuntimeCore runtimeCore, string tag, bool showRawData, WatchHandlerCallback callback)
 {
     return(new WatchViewModel(value.ToString(numberFormat, CultureInfo.InvariantCulture), tag, RequestSelectGeometry));
 }