public Arguments(BuiltinCall activation)
        {
            this.activation = activation;

            IScriptable parent = activation.ParentScope;

            ParentScope = parent;
            SetPrototype(ScriptableObject.GetObjectPrototype(parent));

            args      = activation.originalArgs;
            lengthObj = (int)args.Length;

            BuiltinFunction f = activation.function;

            calleeObj = f;

            Context.Versions version = f.LanguageVersion;
            if (version <= Context.Versions.JS1_3 && version != Context.Versions.Default)
            {
                callerObj = null;
            }
            else
            {
                callerObj = UniqueTag.NotFound;
            }
        }
Beispiel #2
0
        internal static void Init(IScriptable scope, bool zealed)
        {
            BuiltinWith obj = new BuiltinWith();

            obj.ParentScope = scope;
            obj.SetPrototype(ScriptableObject.GetObjectPrototype(scope));

            IdFunctionObject ctor = new IdFunctionObject(obj, FTAG, Id_constructor, "With", 0, scope);

            ctor.MarkAsConstructor(obj);
            if (zealed)
            {
                ctor.SealObject();
            }
            ctor.ExportAsScopeProperty();
        }