OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 24 matching lines...) Expand all Loading... |
35 namespace internal { | 35 namespace internal { |
36 | 36 |
37 // The list of accessor descriptors. This is a second-order macro | 37 // The list of accessor descriptors. This is a second-order macro |
38 // taking a macro to be applied to all accessor descriptor names. | 38 // taking a macro to be applied to all accessor descriptor names. |
39 #define ACCESSOR_DESCRIPTOR_LIST(V) \ | 39 #define ACCESSOR_DESCRIPTOR_LIST(V) \ |
40 V(FunctionPrototype) \ | 40 V(FunctionPrototype) \ |
41 V(FunctionLength) \ | 41 V(FunctionLength) \ |
42 V(FunctionName) \ | 42 V(FunctionName) \ |
43 V(FunctionArguments) \ | 43 V(FunctionArguments) \ |
44 V(FunctionCaller) \ | 44 V(FunctionCaller) \ |
45 V(ArrayLength) \ | 45 V(ArrayLength) |
46 V(ScriptType) \ | 46 |
| 47 #define ACCESSOR_INFO_LIST(V) \ |
| 48 V(ScriptColumnOffset) \ |
47 V(ScriptCompilationType) \ | 49 V(ScriptCompilationType) \ |
48 V(ScriptLineEnds) \ | |
49 V(ScriptContextData) \ | 50 V(ScriptContextData) \ |
50 V(ScriptEvalFromScript) \ | 51 V(ScriptEvalFromScript) \ |
51 V(ScriptEvalFromScriptPosition) \ | 52 V(ScriptEvalFromScriptPosition) \ |
52 V(ScriptEvalFromFunctionName) | 53 V(ScriptEvalFromFunctionName) \ |
53 | |
54 #define ACCESSOR_INFO_LIST(V) \ | |
55 V(ScriptColumnOffset) \ | |
56 V(ScriptId) \ | 54 V(ScriptId) \ |
| 55 V(ScriptLineEnds) \ |
57 V(ScriptLineOffset) \ | 56 V(ScriptLineOffset) \ |
58 V(ScriptName) \ | 57 V(ScriptName) \ |
59 V(ScriptSource) \ | 58 V(ScriptSource) \ |
60 V(StringLength) \ | 59 V(ScriptType) \ |
| 60 V(StringLength) |
61 | 61 |
62 // Accessors contains all predefined proxy accessors. | 62 // Accessors contains all predefined proxy accessors. |
63 | 63 |
64 class Accessors : public AllStatic { | 64 class Accessors : public AllStatic { |
65 public: | 65 public: |
66 // Accessor descriptors. | 66 // Accessor descriptors. |
67 #define ACCESSOR_DESCRIPTOR_DECLARATION(name) \ | 67 #define ACCESSOR_DESCRIPTOR_DECLARATION(name) \ |
68 static const AccessorDescriptor name; | 68 static const AccessorDescriptor name; |
69 ACCESSOR_DESCRIPTOR_LIST(ACCESSOR_DESCRIPTOR_DECLARATION) | 69 ACCESSOR_DESCRIPTOR_LIST(ACCESSOR_DESCRIPTOR_DECLARATION) |
70 #undef ACCESSOR_DESCRIPTOR_DECLARATION | 70 #undef ACCESSOR_DESCRIPTOR_DECLARATION |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 Object* object, | 130 Object* object, |
131 void*); | 131 void*); |
132 static MaybeObject* FunctionGetCaller(Isolate* isolate, | 132 static MaybeObject* FunctionGetCaller(Isolate* isolate, |
133 Object* object, | 133 Object* object, |
134 void*); | 134 void*); |
135 static MaybeObject* ArraySetLength(Isolate* isolate, | 135 static MaybeObject* ArraySetLength(Isolate* isolate, |
136 JSObject* object, | 136 JSObject* object, |
137 Object*, | 137 Object*, |
138 void*); | 138 void*); |
139 static MaybeObject* ArrayGetLength(Isolate* isolate, Object* object, void*); | 139 static MaybeObject* ArrayGetLength(Isolate* isolate, Object* object, void*); |
140 static MaybeObject* ScriptGetType(Isolate* isolate, Object* object, void*); | |
141 static MaybeObject* ScriptGetCompilationType(Isolate* isolate, | |
142 Object* object, | |
143 void*); | |
144 static MaybeObject* ScriptGetLineEnds(Isolate* isolate, | |
145 Object* object, | |
146 void*); | |
147 static MaybeObject* ScriptGetContextData(Isolate* isolate, | |
148 Object* object, | |
149 void*); | |
150 static MaybeObject* ScriptGetEvalFromScript(Isolate* isolate, | |
151 Object* object, | |
152 void*); | |
153 static MaybeObject* ScriptGetEvalFromScriptPosition(Isolate* isolate, | |
154 Object* object, | |
155 void*); | |
156 static MaybeObject* ScriptGetEvalFromFunctionName(Isolate* isolate, | |
157 Object* object, | |
158 void*); | |
159 | 140 |
160 // Helper functions. | 141 // Helper functions. |
161 static Handle<Object> FlattenNumber(Isolate* isolate, Handle<Object> value); | 142 static Handle<Object> FlattenNumber(Isolate* isolate, Handle<Object> value); |
162 static MaybeObject* IllegalSetter(Isolate* isolate, | 143 static MaybeObject* IllegalSetter(Isolate* isolate, |
163 JSObject*, | 144 JSObject*, |
164 Object*, | 145 Object*, |
165 void*); | 146 void*); |
166 static Object* IllegalGetAccessor(Isolate* isolate, Object* object, void*); | 147 static Object* IllegalGetAccessor(Isolate* isolate, Object* object, void*); |
167 static MaybeObject* ReadOnlySetAccessor(Isolate* isolate, | 148 static MaybeObject* ReadOnlySetAccessor(Isolate* isolate, |
168 JSObject*, | 149 JSObject*, |
169 Object* value, | 150 Object* value, |
170 void*); | 151 void*); |
171 }; | 152 }; |
172 | 153 |
173 } } // namespace v8::internal | 154 } } // namespace v8::internal |
174 | 155 |
175 #endif // V8_ACCESSORS_H_ | 156 #endif // V8_ACCESSORS_H_ |
OLD | NEW |