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_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 1824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1835 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object, | 1835 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object, |
1836 uint32_t limit); | 1836 uint32_t limit); |
1837 | 1837 |
1838 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithInterceptor( | 1838 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithInterceptor( |
1839 LookupIterator* it, Handle<Object> value); | 1839 LookupIterator* it, Handle<Object> value); |
1840 | 1840 |
1841 // SetLocalPropertyIgnoreAttributes converts callbacks to fields. We need to | 1841 // SetLocalPropertyIgnoreAttributes converts callbacks to fields. We need to |
1842 // grant an exemption to ExecutableAccessor callbacks in some cases. | 1842 // grant an exemption to ExecutableAccessor callbacks in some cases. |
1843 enum ExecutableAccessorInfoHandling { DEFAULT_HANDLING, DONT_FORCE_FIELD }; | 1843 enum ExecutableAccessorInfoHandling { DEFAULT_HANDLING, DONT_FORCE_FIELD }; |
1844 | 1844 |
1845 // Calls SetOwn[Property|Element]IgnoreAttributes depending on whether name is | 1845 MUST_USE_RESULT static MaybeHandle<Object> DefineOwnPropertyIgnoreAttributes( |
1846 // convertible to an index. | 1846 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes, |
1847 MUST_USE_RESULT static inline MaybeHandle<Object> DefinePropertyOrElement( | |
1848 Handle<JSObject> object, Handle<Name> name, Handle<Object> value, | |
1849 PropertyAttributes attributes = NONE, | |
1850 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING); | 1847 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING); |
1851 | 1848 |
1852 MUST_USE_RESULT static MaybeHandle<Object> SetOwnPropertyIgnoreAttributes( | 1849 MUST_USE_RESULT static MaybeHandle<Object> SetOwnPropertyIgnoreAttributes( |
1853 Handle<JSObject> object, Handle<Name> name, Handle<Object> value, | 1850 Handle<JSObject> object, Handle<Name> name, Handle<Object> value, |
1854 PropertyAttributes attributes, | 1851 PropertyAttributes attributes, |
1855 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING); | 1852 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING); |
1856 | 1853 |
1857 MUST_USE_RESULT static MaybeHandle<Object> SetOwnElementIgnoreAttributes( | 1854 MUST_USE_RESULT static MaybeHandle<Object> SetOwnElementIgnoreAttributes( |
1858 Handle<JSObject> object, uint32_t index, Handle<Object> value, | 1855 Handle<JSObject> object, uint32_t index, Handle<Object> value, |
1859 PropertyAttributes attributes, | 1856 PropertyAttributes attributes, |
1860 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING); | 1857 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING); |
1861 | 1858 |
1862 MUST_USE_RESULT static MaybeHandle<Object> ReconfigureAsDataProperty( | 1859 // Equivalent to one of the above depending on whether |name| can be converted |
1863 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes, | 1860 // to an array index. |
| 1861 MUST_USE_RESULT static MaybeHandle<Object> |
| 1862 DefinePropertyOrElementIgnoreAttributes( |
| 1863 Handle<JSObject> object, Handle<Name> name, Handle<Object> value, |
| 1864 PropertyAttributes attributes = NONE, |
1864 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING); | 1865 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING); |
1865 | 1866 |
1866 static void AddProperty(Handle<JSObject> object, Handle<Name> name, | 1867 static void AddProperty(Handle<JSObject> object, Handle<Name> name, |
1867 Handle<Object> value, PropertyAttributes attributes); | 1868 Handle<Object> value, PropertyAttributes attributes); |
1868 | 1869 |
1869 MUST_USE_RESULT static MaybeHandle<Object> AddDataElement( | 1870 MUST_USE_RESULT static MaybeHandle<Object> AddDataElement( |
1870 Handle<JSObject> receiver, uint32_t index, Handle<Object> value, | 1871 Handle<JSObject> receiver, uint32_t index, Handle<Object> value, |
1871 PropertyAttributes attributes); | 1872 PropertyAttributes attributes); |
1872 | 1873 |
1873 // Extend the receiver with a single fast property appeared first in the | 1874 // Extend the receiver with a single fast property appeared first in the |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2308 static void MigrateFastToFast(Handle<JSObject> object, Handle<Map> new_map); | 2309 static void MigrateFastToFast(Handle<JSObject> object, Handle<Map> new_map); |
2309 static void MigrateFastToSlow(Handle<JSObject> object, | 2310 static void MigrateFastToSlow(Handle<JSObject> object, |
2310 Handle<Map> new_map, | 2311 Handle<Map> new_map, |
2311 int expected_additional_properties); | 2312 int expected_additional_properties); |
2312 | 2313 |
2313 // Used from Object::GetProperty(). | 2314 // Used from Object::GetProperty(). |
2314 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithFailedAccessCheck( | 2315 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithFailedAccessCheck( |
2315 LookupIterator* it); | 2316 LookupIterator* it); |
2316 | 2317 |
2317 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithFailedAccessCheck( | 2318 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithFailedAccessCheck( |
2318 LookupIterator* it, Handle<Object> value, LanguageMode language_mode); | 2319 LookupIterator* it, Handle<Object> value); |
2319 | 2320 |
2320 // Add a property to a slow-case object. | 2321 // Add a property to a slow-case object. |
2321 static void AddSlowProperty(Handle<JSObject> object, | 2322 static void AddSlowProperty(Handle<JSObject> object, |
2322 Handle<Name> name, | 2323 Handle<Name> name, |
2323 Handle<Object> value, | 2324 Handle<Object> value, |
2324 PropertyAttributes attributes); | 2325 PropertyAttributes attributes); |
2325 | 2326 |
2326 MUST_USE_RESULT static MaybeHandle<Object> DeletePropertyWithInterceptor( | 2327 MUST_USE_RESULT static MaybeHandle<Object> DeletePropertyWithInterceptor( |
2327 LookupIterator* it); | 2328 LookupIterator* it); |
2328 | 2329 |
(...skipping 8520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10849 } else { | 10850 } else { |
10850 value &= ~(1 << bit_position); | 10851 value &= ~(1 << bit_position); |
10851 } | 10852 } |
10852 return value; | 10853 return value; |
10853 } | 10854 } |
10854 }; | 10855 }; |
10855 | 10856 |
10856 } } // namespace v8::internal | 10857 } } // namespace v8::internal |
10857 | 10858 |
10858 #endif // V8_OBJECTS_H_ | 10859 #endif // V8_OBJECTS_H_ |
OLD | NEW |