説明を見る。00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef V8_ACCESSORS_H_
00029 #define V8_ACCESSORS_H_
00030
00031 namespace v8 { namespace internal {
00032
00033
00034
00035 #define ACCESSOR_DESCRIPTOR_LIST(V) \
00036 V(FunctionPrototype) \
00037 V(FunctionLength) \
00038 V(FunctionName) \
00039 V(FunctionArguments) \
00040 V(FunctionCaller) \
00041 V(ArrayLength) \
00042 V(StringLength) \
00043 V(ScriptSource) \
00044 V(ScriptName) \
00045 V(ScriptLineOffset) \
00046 V(ScriptColumnOffset) \
00047 V(ScriptType) \
00048 V(ObjectPrototype)
00049
00050
00051
00052 class Accessors : public AllStatic {
00053 public:
00054
00055 #define ACCESSOR_DESCRIPTOR_DECLARATION(name) \
00056 static const AccessorDescriptor name;
00057 ACCESSOR_DESCRIPTOR_LIST(ACCESSOR_DESCRIPTOR_DECLARATION)
00058 #undef ACCESSOR_DESCRIPTOR_DECLARATION
00059
00060 enum DescriptorId {
00061 #define ACCESSOR_DESCRIPTOR_DECLARATION(name) \
00062 k##name,
00063 ACCESSOR_DESCRIPTOR_LIST(ACCESSOR_DESCRIPTOR_DECLARATION)
00064 #undef ACCESSOR_DESCRIPTOR_DECLARATION
00065 descriptorCount
00066 };
00067
00068
00069 static Object* FunctionGetPrototype(Object* object, void*);
00070 static Object* FunctionSetPrototype(JSObject* object, Object* value, void*);
00071 private:
00072
00073 static Object* FunctionGetLength(Object* object, void*);
00074 static Object* FunctionGetName(Object* object, void*);
00075 static Object* FunctionGetArguments(Object* object, void*);
00076 static Object* FunctionGetCaller(Object* object, void*);
00077 static Object* ArraySetLength(JSObject* object, Object* value, void*);
00078 static Object* ArrayGetLength(Object* object, void*);
00079 static Object* StringGetLength(Object* object, void*);
00080 static Object* ScriptGetName(Object* object, void*);
00081 static Object* ScriptGetSource(Object* object, void*);
00082 static Object* ScriptGetLineOffset(Object* object, void*);
00083 static Object* ScriptGetColumnOffset(Object* object, void*);
00084 static Object* ScriptGetType(Object* object, void*);
00085 static Object* ObjectGetPrototype(Object* receiver, void*);
00086 static Object* ObjectSetPrototype(JSObject* receiver, Object* value, void*);
00087
00088
00089 static Object* FlattenNumber(Object* value);
00090 static Object* IllegalSetter(JSObject*, Object*, void*);
00091 static Object* IllegalGetAccessor(Object* object, void*);
00092 static Object* ReadOnlySetAccessor(JSObject*, Object* value, void*);
00093 };
00094
00095 } }
00096
00097 #endif // V8_ACCESSORS_H_