| 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 "include/v8.h" | 8 #include "include/v8.h" |
| 9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
| 10 #include "src/globals.h" | 10 #include "src/globals.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 k##name##Getter, \ | 76 k##name##Getter, \ |
| 77 k##name##Setter, | 77 k##name##Setter, |
| 78 ACCESSOR_INFO_LIST(ACCESSOR_INFO_DECLARATION) | 78 ACCESSOR_INFO_LIST(ACCESSOR_INFO_DECLARATION) |
| 79 #undef ACCESSOR_INFO_DECLARATION | 79 #undef ACCESSOR_INFO_DECLARATION |
| 80 descriptorCount | 80 descriptorCount |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 // Accessor functions called directly from the runtime system. | 83 // Accessor functions called directly from the runtime system. |
| 84 MUST_USE_RESULT static MaybeHandle<Object> FunctionSetPrototype( | 84 MUST_USE_RESULT static MaybeHandle<Object> FunctionSetPrototype( |
| 85 Handle<JSFunction> object, Handle<Object> value); | 85 Handle<JSFunction> object, Handle<Object> value); |
| 86 static Handle<Object> FunctionGetArguments(Handle<JSFunction> object); | 86 static Handle<JSObject> FunctionGetArguments(Handle<JSFunction> object); |
| 87 | 87 |
| 88 // Accessor infos. | 88 // Accessor infos. |
| 89 static Handle<AccessorInfo> MakeModuleExport( | 89 static Handle<AccessorInfo> MakeModuleExport( |
| 90 Handle<String> name, int index, PropertyAttributes attributes); | 90 Handle<String> name, int index, PropertyAttributes attributes); |
| 91 | 91 |
| 92 // Returns true for properties that are accessors to object fields. | 92 // Returns true for properties that are accessors to object fields. |
| 93 // If true, *object_offset contains offset of object field. | 93 // If true, *object_offset contains offset of object field. |
| 94 static bool IsJSObjectFieldAccessor(Handle<Map> map, Handle<Name> name, | 94 static bool IsJSObjectFieldAccessor(Handle<Map> map, Handle<Name> name, |
| 95 int* object_offset); | 95 int* object_offset); |
| 96 | 96 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 107 Handle<Name> name, | 107 Handle<Name> name, |
| 108 AccessorNameGetterCallback getter, | 108 AccessorNameGetterCallback getter, |
| 109 AccessorNameSetterCallback setter, | 109 AccessorNameSetterCallback setter, |
| 110 PropertyAttributes attributes); | 110 PropertyAttributes attributes); |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 } // namespace internal | 113 } // namespace internal |
| 114 } // namespace v8 | 114 } // namespace v8 |
| 115 | 115 |
| 116 #endif // V8_ACCESSORS_H_ | 116 #endif // V8_ACCESSORS_H_ |
| OLD | NEW |