X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/f9bf01c6616d5ddcf65b13b33cedf9e387ff7a63..1df5f87f1309a8daa30dabdee855f48ae40d14ab:/runtime/DateConstructor.h diff --git a/runtime/DateConstructor.h b/runtime/DateConstructor.h index 10e450e..63e78cf 100644 --- a/runtime/DateConstructor.h +++ b/runtime/DateConstructor.h @@ -1,6 +1,6 @@ /* * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) - * Copyright (C) 2008 Apple Inc. All rights reserved. + * Copyright (C) 2008, 2011 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -29,14 +29,27 @@ namespace JSC { class DateConstructor : public InternalFunction { public: - DateConstructor(ExecState*, NonNullPassRefPtr, Structure* prototypeFunctionStructure, DatePrototype*); + DateConstructor(ExecState*, JSGlobalObject*, Structure*, DatePrototype*); + + static const ClassInfo s_info; + + static Structure* createStructure(JSGlobalData& globalData, JSValue prototype) + { + return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); + } + + protected: + static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags; private: virtual ConstructType getConstructData(ConstructData&); virtual CallType getCallData(CallData&); + + virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); + virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); }; - JSObject* constructDate(ExecState*, const ArgList&); + JSObject* constructDate(ExecState*, JSGlobalObject*, const ArgList&); } // namespace JSC