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