示例#1
0
        public VsaEngine(bool fast)
            : base("JScript", "7.0.3300", true)
        {
            vsaItems       = new VsaItems(this);
            detached       = false;
            printSupported = false;
            engineInstance = new EngineInstance(this);
            engineInstance.Init();

            // Set the global context to this engine if we are
            // the only engine instance in the system.
            Globals.SetContextEngine(this);

            // Create the global object that contains all of
            // the definitions in the engine's global scope.
            lenientGlobalObject = new LenientGlobalObject(this);

            // Create the global scope object.
            globalScope = new GlobalScope
                              (null, lenientGlobalObject.globalObject);

            // Initialize the scope stack.
            scopeStack     = new Object [8];
            scopeStack[0]  = globalScope;
            scopeStackSize = 1;
            currentScope   = globalScope;
        }