static void Main(string[] args) { Console.WriteLine("DistVM - Secure Execution Environment"); StreamReader mreader = new StreamReader("IDWOS.js"); mnul.TranslatedFunctions.AddRange(new MethodInfo[] { ResolveMethod("CreateRenderer"), ResolveMethod("CreateBitmap"),ResolveMethod("CreateVertexBuffer"), ResolveMethod("RotateBuffer"), ResolveMethod("SetCameraPosition"),ResolveMethod("createThread"), ResolveMethod("CreateGraphics"),ResolveMethod("createBitmapFromWidthHeight"), ResolveMethod("onKeyPress"),ResolveMethod("onKeyUp"),ResolveMethod("CreateFS") }); mnul.Initialize(); vm = mnul.vm; string code = Link(mreader.ReadToEnd() + "\nmain();"); mnul.Run(code); }
public void Initialize() { vm = new JavaScriptVM(); }