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 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1834 uint32_t limit); | 1834 uint32_t limit); |
1835 // As PrepareElementsForSort, but only on objects where elements is | 1835 // As PrepareElementsForSort, but only on objects where elements is |
1836 // a dictionary, and it will stay a dictionary. Collates undefined and | 1836 // a dictionary, and it will stay a dictionary. Collates undefined and |
1837 // unexisting elements below limit from position zero of the elements. | 1837 // unexisting elements below limit from position zero of the elements. |
1838 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object, | 1838 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object, |
1839 uint32_t limit); | 1839 uint32_t limit); |
1840 | 1840 |
1841 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithInterceptor( | 1841 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithInterceptor( |
1842 LookupIterator* it, Handle<Object> value); | 1842 LookupIterator* it, Handle<Object> value); |
1843 | 1843 |
| 1844 // SetLocalPropertyIgnoreAttributes converts callbacks to fields. We need to |
| 1845 // grant an exemption to ExecutableAccessor callbacks in some cases. |
| 1846 enum ExecutableAccessorInfoHandling { DEFAULT_HANDLING, DONT_FORCE_FIELD }; |
| 1847 |
1844 MUST_USE_RESULT static MaybeHandle<Object> SetOwnPropertyIgnoreAttributes( | 1848 MUST_USE_RESULT static MaybeHandle<Object> SetOwnPropertyIgnoreAttributes( |
1845 Handle<JSObject> object, Handle<Name> name, Handle<Object> value, | 1849 Handle<JSObject> object, Handle<Name> name, Handle<Object> value, |
1846 PropertyAttributes attributes); | 1850 PropertyAttributes attributes, |
| 1851 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING); |
1847 | 1852 |
1848 MUST_USE_RESULT static MaybeHandle<Object> SetOwnElementIgnoreAttributes( | 1853 MUST_USE_RESULT static MaybeHandle<Object> SetOwnElementIgnoreAttributes( |
1849 Handle<JSObject> object, uint32_t index, Handle<Object> value, | 1854 Handle<JSObject> object, uint32_t index, Handle<Object> value, |
1850 PropertyAttributes attributes); | 1855 PropertyAttributes attributes, |
| 1856 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING); |
1851 | 1857 |
1852 MUST_USE_RESULT static MaybeHandle<Object> ReconfigureAsDataProperty( | 1858 MUST_USE_RESULT static MaybeHandle<Object> ReconfigureAsDataProperty( |
1853 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes); | 1859 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes, |
| 1860 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING); |
1854 | 1861 |
1855 static void AddProperty(Handle<JSObject> object, Handle<Name> name, | 1862 static void AddProperty(Handle<JSObject> object, Handle<Name> name, |
1856 Handle<Object> value, PropertyAttributes attributes); | 1863 Handle<Object> value, PropertyAttributes attributes); |
1857 | 1864 |
1858 MUST_USE_RESULT static MaybeHandle<Object> AddDataElement( | 1865 MUST_USE_RESULT static MaybeHandle<Object> AddDataElement( |
1859 Handle<JSObject> receiver, uint32_t index, Handle<Object> value, | 1866 Handle<JSObject> receiver, uint32_t index, Handle<Object> value, |
1860 PropertyAttributes attributes); | 1867 PropertyAttributes attributes); |
1861 | 1868 |
1862 // Extend the receiver with a single fast property appeared first in the | 1869 // Extend the receiver with a single fast property appeared first in the |
1863 // passed map. This also extends the property backing store if necessary. | 1870 // passed map. This also extends the property backing store if necessary. |
(...skipping 8976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10840 } else { | 10847 } else { |
10841 value &= ~(1 << bit_position); | 10848 value &= ~(1 << bit_position); |
10842 } | 10849 } |
10843 return value; | 10850 return value; |
10844 } | 10851 } |
10845 }; | 10852 }; |
10846 | 10853 |
10847 } } // namespace v8::internal | 10854 } } // namespace v8::internal |
10848 | 10855 |
10849 #endif // V8_OBJECTS_H_ | 10856 #endif // V8_OBJECTS_H_ |
OLD | NEW |