private XzaarAssembly Read(byte[] binary) { var assembly = new XzaarAssembly(); var ctx = new AssemblyReaderContext(binary, assembly); return(this.Read(ctx)); }
internal Runtime(VirtualMachine vm, XzaarAssembly asm, RuntimeSettings settings) { this.vm = vm; this.asm = asm; this.settings = settings ?? RuntimeSettings.Default; this.Init(); }
// private int tempVariableCount; public ScriptCompilerContext(string assemblyName, XzaarExpression expressionTree) { MethodInstructions = new CompilerInstructionCollection(this); GlobalInstructions = new CompilerInstructionCollection(this); this.ExpressionTree = expressionTree; this.KnownTypes = new List <TypeReference>(); this.Assembly = XzaarAssembly.CreateAssembly(assemblyName); this.flowControl = new FlowControlScope(null, -1); this.rootFlowControl = this.flowControl; }
public static string AssemblyCode(this XzaarAssembly tree) { return(XzaarScriptDisassembler.Disassemble(tree)); }
public static XzaarRuntime Load(this XzaarAssembly asm) { return(XzaarVirtualMachine.Load(asm)); }
public AssemblyWriterContext(XzaarAssembly assembly, string filename) { this.Assembly = assembly; this.Filename = filename; }
public static Runtime Debug(XzaarAssembly asm, RuntimeSettings settings) { return(new VirtualMachine(asm).RunImpl(RuntimeStepType.StepByStep, settings)); }
public static Runtime Load(XzaarAssembly asm, RuntimeSettings settings) { return(new VirtualMachine(asm).CreateRuntimeInstance(settings)); }
public static Runtime Run(XzaarAssembly asm, RuntimeSettings settings) { return(new VirtualMachine(asm).RunImpl(RuntimeStepType.Complete, settings)); }
public static Runtime Load(this XzaarAssembly asm, RuntimeSettings settings) { return(VirtualMachine.Load(asm, settings)); }
public VirtualMachine(XzaarAssembly asm) { this.asm = asm; this.interpreter = new VirtualMachineInstructionInterpreter(this); }
public static Runtime Run(this XzaarAssembly asm) { return(VirtualMachine.Run(asm)); }
public static void WriteToFile(XzaarAssembly xzaarAssembly, string filename) { var writer = new AssemblyWriter(); writer.Write(new AssemblyWriterContext(xzaarAssembly, filename)); }
public AssemblyReaderContext(byte[] assemblyBytes, XzaarAssembly assembly) { this.AssemblyBytes = assemblyBytes; this.Assembly = assembly; this.Reader = new BinaryReader(new MemoryStream(this.AssemblyBytes)); }
public static string Disassemble(XzaarAssembly asm) { return(new XzaarScriptDisassembler(asm).Disassemble()); }
public XzaarScriptDisassembler(XzaarAssembly asm) { this.asm = asm; }