示例#1
0
        public Environment()
        {
            Output    = new Output();
            EmptyArgs = new SArgs(this);
            True      = new LBoolean(this, true);
            False     = new LBoolean(this, false);
            Undefined = new LUndefined(this);
            Null      = new LNull(this);

            GlobalObject              = new BGlobal(this);
            GlobalEnvironment         = new SLexicalEnvironment(this, new SObjectEnvironmentRecord(this, GlobalObject, false), null);
            MathObject                = new BMath(this);
            JsonObject                = new BJson(this);
            ObjectConstructor         = new CObject(this);
            FunctionConstructor       = new CFunction(this);
            ArrayConstructor          = new CArray(this);
            StringConstructor         = new CString(this);
            BooleanConstructor        = new CBoolean(this);
            NumberConstructor         = new CNumber(this);
            DateConstructor           = new CDate(this);
            RegExpConstructor         = new CRegExp(this);
            ErrorConstructor          = new CError(this);
            EvalErrorConstructor      = new CEvalError(this);
            RangeErrorConstructor     = new CRangeError(this);
            ReferenceErrorConstructor = new CReferenceError(this);
            SyntaxErrorConstructor    = new CSyntaxError(this);
            TypeErrorConstructor      = new CTypeError(this);
            UriErrorConstructor       = new CUriError(this);
            ObjectPrototype           = new PObject(this);
            FunctionPrototype         = new PFunction(this);
            ArrayPrototype            = new PArray(this);
            StringPrototype           = new PString(this);
            BooleanPrototype          = new PBoolean(this);
            NumberPrototype           = new PNumber(this);
            DatePrototype             = new PDate(this);
            RegExpPrototype           = new PRegExp(this);
            ErrorPrototype            = new PError(this);
            EvalErrorPrototype        = new PEvalError(this);
            RangeErrorPrototype       = new PRangeError(this);
            ReferenceErrorPrototype   = new PReferenceError(this);
            SyntaxErrorPrototype      = new PSyntaxError(this);
            TypeErrorPrototype        = new PTypeError(this);
            UriErrorPrototype         = new PUriError(this);

            GlobalObject.Initialize();
            MathObject.Initialize();
            JsonObject.Initialize();
            ObjectConstructor.Initialize();
            FunctionConstructor.Initialize();
            ArrayConstructor.Initialize();
            StringConstructor.Initialize();
            BooleanConstructor.Initialize();
            NumberConstructor.Initialize();
            DateConstructor.Initialize();
            RegExpConstructor.Initialize();
            ErrorConstructor.Initialize();
            EvalErrorConstructor.Initialize();
            RangeErrorConstructor.Initialize();
            ReferenceErrorConstructor.Initialize();
            SyntaxErrorConstructor.Initialize();
            TypeErrorConstructor.Initialize();
            UriErrorConstructor.Initialize();
            ObjectPrototype.Initialize();
            FunctionPrototype.Initialize();
            ArrayPrototype.Initialize();
            StringPrototype.Initialize();
            BooleanPrototype.Initialize();
            NumberPrototype.Initialize();
            DatePrototype.Initialize();
            RegExpPrototype.Initialize();
            ErrorPrototype.Initialize();
            EvalErrorPrototype.Initialize();
            RangeErrorPrototype.Initialize();
            ReferenceErrorPrototype.Initialize();
            SyntaxErrorPrototype.Initialize();
            TypeErrorPrototype.Initialize();
            UriErrorPrototype.Initialize();
        }