Changeset 27608 in webkit for trunk/JavaScriptCore/kjs/math_object.h
- Timestamp:
- Nov 8, 2007, 12:31:26 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/math_object.h
r13821 r27608 24 24 25 25 #include "function_object.h" 26 #include "lookup.h" 26 27 27 28 namespace KJS { … … 29 30 class MathObjectImp : public JSObject { 30 31 public: 31 MathObjectImp(ExecState *exec, 32 ObjectPrototype *objProto); 33 bool getOwnPropertySlot(ExecState *, const Identifier&, PropertySlot&); 34 JSValue *getValueProperty(ExecState *exec, int token) const; 35 virtual const ClassInfo *classInfo() const { return &info; } 32 MathObjectImp(ExecState*, ObjectPrototype*); 33 34 bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); 35 JSValue* getValueProperty(ExecState*, int token) const; 36 37 virtual const ClassInfo* classInfo() const { return &info; } 36 38 static const ClassInfo info; 37 enum { Euler, Ln2, Ln10, Log2E, Log10E, Pi, Sqrt1_2, Sqrt2, 38 Abs, ACos, ASin, ATan, ATan2, Ceil, Cos, Pow, 39 Exp, Floor, Log, Max, Min, Random, Round, Sin, Sqrt, Tan }; 39 40 enum { Euler, Ln2, Ln10, Log2E, Log10E, Pi, Sqrt1_2, Sqrt2 }; 40 41 }; 41 42 42 class MathFuncImp : public InternalFunctionImp {43 public:44 MathFuncImp(ExecState *exec, int i, int l, const Identifier&);45 virtual JSValue *callAsFunction(ExecState *exec, JSObject *thisObj, const List &args);46 private:47 int id;48 };49 43 50 } // namespace 44 #define FOR_EACH_CLASS(macro) \ 45 macro(MathProtoFuncAbs) \ 46 macro(MathProtoFuncACos) \ 47 macro(MathProtoFuncASin) \ 48 macro(MathProtoFuncATan) \ 49 macro(MathProtoFuncATan2) \ 50 macro(MathProtoFuncCeil) \ 51 macro(MathProtoFuncCos) \ 52 macro(MathProtoFuncExp) \ 53 macro(MathProtoFuncFloor) \ 54 macro(MathProtoFuncLog) \ 55 macro(MathProtoFuncMax) \ 56 macro(MathProtoFuncMin) \ 57 macro(MathProtoFuncPow) \ 58 macro(MathProtoFuncRandom) \ 59 macro(MathProtoFuncRound) \ 60 macro(MathProtoFuncSin) \ 61 macro(MathProtoFuncSqrt) \ 62 macro(MathProtoFuncTan) \ 51 63 52 #endif 64 FOR_EACH_CLASS(KJS_IMPLEMENT_PROTOTYPE_FUNCTION_WITH_CREATE) 65 #undef FOR_EACH_CLASS 66 67 68 } // namespace KJS 69 70 #endif // MATH_OBJECT_H_
Note:
See TracChangeset
for help on using the changeset viewer.