| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_ACCESSORS_H_ | 5 #ifndef V8_ACCESSORS_H_ |
| 6 #define V8_ACCESSORS_H_ | 6 #define V8_ACCESSORS_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/globals.h" | 9 #include "src/globals.h" |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 k##name##Getter, \ | 61 k##name##Getter, \ |
| 62 k##name##Setter, | 62 k##name##Setter, |
| 63 ACCESSOR_INFO_LIST(ACCESSOR_INFO_DECLARATION) | 63 ACCESSOR_INFO_LIST(ACCESSOR_INFO_DECLARATION) |
| 64 #undef ACCESSOR_INFO_DECLARATION | 64 #undef ACCESSOR_INFO_DECLARATION |
| 65 descriptorCount | 65 descriptorCount |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 // Accessor functions called directly from the runtime system. | 68 // Accessor functions called directly from the runtime system. |
| 69 static Handle<Object> FunctionSetPrototype(Handle<JSFunction> object, | 69 static Handle<Object> FunctionSetPrototype(Handle<JSFunction> object, |
| 70 Handle<Object> value); | 70 Handle<Object> value); |
| 71 static Handle<Object> FunctionGetPrototype(Handle<JSFunction> object); | |
| 72 static Handle<Object> FunctionGetArguments(Handle<JSFunction> object); | 71 static Handle<Object> FunctionGetArguments(Handle<JSFunction> object); |
| 73 | 72 |
| 74 // Accessor infos. | 73 // Accessor infos. |
| 75 static Handle<AccessorInfo> MakeModuleExport( | 74 static Handle<AccessorInfo> MakeModuleExport( |
| 76 Handle<String> name, int index, PropertyAttributes attributes); | 75 Handle<String> name, int index, PropertyAttributes attributes); |
| 77 | 76 |
| 78 // Returns true for properties that are accessors to object fields. | 77 // Returns true for properties that are accessors to object fields. |
| 79 // If true, *object_offset contains offset of object field. | 78 // If true, *object_offset contains offset of object field. |
| 80 template <class T> | 79 template <class T> |
| 81 static bool IsJSObjectFieldAccessor(typename T::TypeHandle type, | 80 static bool IsJSObjectFieldAccessor(typename T::TypeHandle type, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 95 | 94 |
| 96 | 95 |
| 97 private: | 96 private: |
| 98 // Helper functions. | 97 // Helper functions. |
| 99 static Handle<Object> FlattenNumber(Isolate* isolate, Handle<Object> value); | 98 static Handle<Object> FlattenNumber(Isolate* isolate, Handle<Object> value); |
| 100 }; | 99 }; |
| 101 | 100 |
| 102 } } // namespace v8::internal | 101 } } // namespace v8::internal |
| 103 | 102 |
| 104 #endif // V8_ACCESSORS_H_ | 103 #endif // V8_ACCESSORS_H_ |
| OLD | NEW |