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 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 | 1169 |
1170 MUST_USE_RESULT static MaybeHandle<Object> SetSuperProperty( | 1170 MUST_USE_RESULT static MaybeHandle<Object> SetSuperProperty( |
1171 LookupIterator* it, Handle<Object> value, LanguageMode language_mode, | 1171 LookupIterator* it, Handle<Object> value, LanguageMode language_mode, |
1172 StoreFromKeyed store_mode); | 1172 StoreFromKeyed store_mode); |
1173 | 1173 |
1174 MUST_USE_RESULT static MaybeHandle<Object> WriteToReadOnlyProperty( | 1174 MUST_USE_RESULT static MaybeHandle<Object> WriteToReadOnlyProperty( |
1175 LookupIterator* it, Handle<Object> value, LanguageMode language_mode); | 1175 LookupIterator* it, Handle<Object> value, LanguageMode language_mode); |
1176 MUST_USE_RESULT static MaybeHandle<Object> WriteToReadOnlyProperty( | 1176 MUST_USE_RESULT static MaybeHandle<Object> WriteToReadOnlyProperty( |
1177 Isolate* isolate, Handle<Object> reciever, Handle<Object> name, | 1177 Isolate* isolate, Handle<Object> reciever, Handle<Object> name, |
1178 Handle<Object> value, LanguageMode language_mode); | 1178 Handle<Object> value, LanguageMode language_mode); |
1179 MUST_USE_RESULT static MaybeHandle<Object> WriteToReadOnlyElement( | |
1180 Isolate* isolate, Handle<Object> receiver, uint32_t index, | |
1181 Handle<Object> value, LanguageMode language_mode); | |
1182 MUST_USE_RESULT static MaybeHandle<Object> RedefineNonconfigurableProperty( | 1179 MUST_USE_RESULT static MaybeHandle<Object> RedefineNonconfigurableProperty( |
1183 Isolate* isolate, Handle<Object> name, Handle<Object> value, | 1180 Isolate* isolate, Handle<Object> name, Handle<Object> value, |
1184 LanguageMode language_mode); | 1181 LanguageMode language_mode); |
1185 MUST_USE_RESULT static MaybeHandle<Object> SetDataProperty( | 1182 MUST_USE_RESULT static MaybeHandle<Object> SetDataProperty( |
1186 LookupIterator* it, Handle<Object> value); | 1183 LookupIterator* it, Handle<Object> value); |
1187 MUST_USE_RESULT static MaybeHandle<Object> AddDataProperty( | 1184 MUST_USE_RESULT static MaybeHandle<Object> AddDataProperty( |
1188 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes, | 1185 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes, |
1189 LanguageMode language_mode, StoreFromKeyed store_mode); | 1186 LanguageMode language_mode, StoreFromKeyed store_mode); |
1190 MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement( | 1187 MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement( |
1191 Handle<Object> object, Handle<Name> name); | 1188 Handle<Object> object, Handle<Name> name); |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1834 uint32_t limit); | 1831 uint32_t limit); |
1835 // As PrepareElementsForSort, but only on objects where elements is | 1832 // As PrepareElementsForSort, but only on objects where elements is |
1836 // a dictionary, and it will stay a dictionary. Collates undefined and | 1833 // a dictionary, and it will stay a dictionary. Collates undefined and |
1837 // unexisting elements below limit from position zero of the elements. | 1834 // unexisting elements below limit from position zero of the elements. |
1838 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object, | 1835 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object, |
1839 uint32_t limit); | 1836 uint32_t limit); |
1840 | 1837 |
1841 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithInterceptor( | 1838 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithInterceptor( |
1842 LookupIterator* it, Handle<Object> value); | 1839 LookupIterator* it, Handle<Object> value); |
1843 | 1840 |
| 1841 // Calls SetOwn[Property|Element]IgnoreAttributes depending on whether name is |
| 1842 // convertible to an index. |
| 1843 MUST_USE_RESULT static inline MaybeHandle<Object> DefinePropertyOrElement( |
| 1844 Handle<JSObject> object, Handle<Name> name, Handle<Object> value, |
| 1845 PropertyAttributes attributes = NONE); |
| 1846 |
1844 MUST_USE_RESULT static MaybeHandle<Object> SetOwnPropertyIgnoreAttributes( | 1847 MUST_USE_RESULT static MaybeHandle<Object> SetOwnPropertyIgnoreAttributes( |
1845 Handle<JSObject> object, Handle<Name> name, Handle<Object> value, | 1848 Handle<JSObject> object, Handle<Name> name, Handle<Object> value, |
1846 PropertyAttributes attributes); | 1849 PropertyAttributes attributes); |
1847 | 1850 |
1848 MUST_USE_RESULT static MaybeHandle<Object> SetOwnElementIgnoreAttributes( | 1851 MUST_USE_RESULT static MaybeHandle<Object> SetOwnElementIgnoreAttributes( |
1849 Handle<JSObject> object, uint32_t index, Handle<Object> value, | 1852 Handle<JSObject> object, uint32_t index, Handle<Object> value, |
1850 PropertyAttributes attributes); | 1853 PropertyAttributes attributes); |
1851 | 1854 |
1852 MUST_USE_RESULT static MaybeHandle<Object> ReconfigureAsDataProperty( | 1855 MUST_USE_RESULT static MaybeHandle<Object> ReconfigureAsDataProperty( |
1853 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes); | 1856 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes); |
(...skipping 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4038 | 4041 |
4039 // Lookup support for serialized scope info. Returns the receiver context | 4042 // Lookup support for serialized scope info. Returns the receiver context |
4040 // slot index if scope has a "this" binding, and the binding is | 4043 // slot index if scope has a "this" binding, and the binding is |
4041 // context-allocated. Otherwise returns a value < 0. | 4044 // context-allocated. Otherwise returns a value < 0. |
4042 int ReceiverContextSlotIndex(); | 4045 int ReceiverContextSlotIndex(); |
4043 | 4046 |
4044 bool block_scope_is_class_scope(); | 4047 bool block_scope_is_class_scope(); |
4045 FunctionKind function_kind(); | 4048 FunctionKind function_kind(); |
4046 | 4049 |
4047 // Copies all the context locals into an object used to materialize a scope. | 4050 // Copies all the context locals into an object used to materialize a scope. |
4048 static bool CopyContextLocalsToScopeObject(Handle<ScopeInfo> scope_info, | 4051 static void CopyContextLocalsToScopeObject(Handle<ScopeInfo> scope_info, |
4049 Handle<Context> context, | 4052 Handle<Context> context, |
4050 Handle<JSObject> scope_object); | 4053 Handle<JSObject> scope_object); |
4051 | 4054 |
4052 | 4055 |
4053 static Handle<ScopeInfo> Create(Isolate* isolate, Zone* zone, Scope* scope); | 4056 static Handle<ScopeInfo> Create(Isolate* isolate, Zone* zone, Scope* scope); |
4054 | 4057 |
4055 // Serializes empty scope info. | 4058 // Serializes empty scope info. |
4056 static ScopeInfo* Empty(Isolate* isolate); | 4059 static ScopeInfo* Empty(Isolate* isolate); |
4057 | 4060 |
4058 #ifdef DEBUG | 4061 #ifdef DEBUG |
(...skipping 6781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10840 } else { | 10843 } else { |
10841 value &= ~(1 << bit_position); | 10844 value &= ~(1 << bit_position); |
10842 } | 10845 } |
10843 return value; | 10846 return value; |
10844 } | 10847 } |
10845 }; | 10848 }; |
10846 | 10849 |
10847 } } // namespace v8::internal | 10850 } } // namespace v8::internal |
10848 | 10851 |
10849 #endif // V8_OBJECTS_H_ | 10852 #endif // V8_OBJECTS_H_ |
OLD | NEW |