summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/NumberConstructor.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/runtime/NumberConstructor.h')
-rw-r--r--Source/JavaScriptCore/runtime/NumberConstructor.h57
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