diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/runtime/NumberConstructor.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/JavaScriptCore/runtime/NumberConstructor.h')
-rw-r--r-- | Source/JavaScriptCore/runtime/NumberConstructor.h | 57 |
1 files changed, 25 insertions, 32 deletions
diff --git a/Source/JavaScriptCore/runtime/NumberConstructor.h b/Source/JavaScriptCore/runtime/NumberConstructor.h index 6c8ed89fe..51e4fa304 100644 --- a/Source/JavaScriptCore/runtime/NumberConstructor.h +++ b/Source/JavaScriptCore/runtime/NumberConstructor.h @@ -18,48 +18,41 @@ * */ -#ifndef NumberConstructor_h -#define NumberConstructor_h +#pragma once #include "InternalFunction.h" namespace JSC { - class NumberPrototype; +class NumberPrototype; +class GetterSetter; - class NumberConstructor : public InternalFunction { - public: - typedef InternalFunction Base; +class NumberConstructor : public InternalFunction { +public: + typedef InternalFunction Base; + static const unsigned StructureFlags = Base::StructureFlags | ImplementsHasInstance | HasStaticPropertyTable; - static NumberConstructor* create(VM& vm, Structure* structure, NumberPrototype* numberPrototype) - { - NumberConstructor* constructor = new (NotNull, allocateCell<NumberConstructor>(vm.heap)) NumberConstructor(vm, structure); - constructor->finishCreation(vm, numberPrototype); - return constructor; - } + static NumberConstructor* create(VM& vm, Structure* structure, NumberPrototype* numberPrototype, GetterSetter*) + { + NumberConstructor* constructor = new (NotNull, allocateCell<NumberConstructor>(vm.heap)) NumberConstructor(vm, structure); + constructor->finishCreation(vm, numberPrototype); + return constructor; + } - static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&); - JSValue getValueProperty(ExecState*, int token) const; + DECLARE_INFO; - DECLARE_INFO; + static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) + { + return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), info()); + } - static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) - { - return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), info()); - } +protected: + void finishCreation(VM&, NumberPrototype*); - enum { NaNValue, NegInfinity, PosInfinity, MaxValue, MinValue }; - - protected: - void finishCreation(VM&, NumberPrototype*); - static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | InternalFunction::StructureFlags; - - private: - NumberConstructor(VM&, Structure*); - static ConstructType getConstructData(JSCell*, ConstructData&); - static CallType getCallData(JSCell*, CallData&); - }; +private: + NumberConstructor(VM&, Structure*); + static ConstructType getConstructData(JSCell*, ConstructData&); + static CallType getCallData(JSCell*, CallData&); +}; } // namespace JSC - -#endif // NumberConstructor_h |