Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public void Initialize()
 {
     vm = new JavaScriptVM();
 }