| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2201 static const int kElementsOffset = kPropertiesOffset + kPointerSize; | 2201 static const int kElementsOffset = kPropertiesOffset + kPointerSize; |
| 2202 static const int kHeaderSize = kElementsOffset + kPointerSize; | 2202 static const int kHeaderSize = kElementsOffset + kPointerSize; |
| 2203 | 2203 |
| 2204 STATIC_CHECK(kHeaderSize == Internals::kJSObjectHeaderSize); | 2204 STATIC_CHECK(kHeaderSize == Internals::kJSObjectHeaderSize); |
| 2205 | 2205 |
| 2206 class BodyDescriptor : public FlexibleBodyDescriptor<kPropertiesOffset> { | 2206 class BodyDescriptor : public FlexibleBodyDescriptor<kPropertiesOffset> { |
| 2207 public: | 2207 public: |
| 2208 static inline int SizeOf(Map* map, HeapObject* object); | 2208 static inline int SizeOf(Map* map, HeapObject* object); |
| 2209 }; | 2209 }; |
| 2210 | 2210 |
| 2211 // Enqueue change record for Object.observe. May cause GC. |
| 2212 static void EnqueueChangeRecord(Handle<JSObject> object, |
| 2213 const char* type, |
| 2214 Handle<String> name, |
| 2215 Handle<Object> old_value); |
| 2216 |
| 2211 // Deliver change records to observers. May cause GC. | 2217 // Deliver change records to observers. May cause GC. |
| 2212 static void DeliverChangeRecords(Isolate* isolate); | 2218 static void DeliverChangeRecords(Isolate* isolate); |
| 2213 | 2219 |
| 2214 private: | 2220 private: |
| 2215 friend class DictionaryElementsAccessor; | 2221 friend class DictionaryElementsAccessor; |
| 2216 | 2222 |
| 2217 MUST_USE_RESULT MaybeObject* GetElementWithCallback(Object* receiver, | 2223 MUST_USE_RESULT MaybeObject* GetElementWithCallback(Object* receiver, |
| 2218 Object* structure, | 2224 Object* structure, |
| 2219 uint32_t index, | 2225 uint32_t index, |
| 2220 Object* holder); | 2226 Object* holder); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2309 // for hidden properties. If there is no backing store, allocate one. | 2315 // for hidden properties. If there is no backing store, allocate one. |
| 2310 // If create_if_absent is false, return the hash table backing store | 2316 // If create_if_absent is false, return the hash table backing store |
| 2311 // or the inline stored identity hash, whatever is found. | 2317 // or the inline stored identity hash, whatever is found. |
| 2312 MUST_USE_RESULT MaybeObject* GetHiddenPropertiesHashTable( | 2318 MUST_USE_RESULT MaybeObject* GetHiddenPropertiesHashTable( |
| 2313 InitializeHiddenProperties init_option); | 2319 InitializeHiddenProperties init_option); |
| 2314 // Set the hidden property backing store to either a hash table or | 2320 // Set the hidden property backing store to either a hash table or |
| 2315 // the inline-stored identity hash. | 2321 // the inline-stored identity hash. |
| 2316 MUST_USE_RESULT MaybeObject* SetHiddenPropertiesHashTable( | 2322 MUST_USE_RESULT MaybeObject* SetHiddenPropertiesHashTable( |
| 2317 Object* value); | 2323 Object* value); |
| 2318 | 2324 |
| 2319 // Enqueue change record for Object.observe. May cause GC. | |
| 2320 void EnqueueChangeRecord(const char* type, | |
| 2321 Handle<String> name, | |
| 2322 Handle<Object> old_value); | |
| 2323 | |
| 2324 DISALLOW_IMPLICIT_CONSTRUCTORS(JSObject); | 2325 DISALLOW_IMPLICIT_CONSTRUCTORS(JSObject); |
| 2325 }; | 2326 }; |
| 2326 | 2327 |
| 2327 | 2328 |
| 2328 // Common superclass for FixedArrays that allow implementations to share | 2329 // Common superclass for FixedArrays that allow implementations to share |
| 2329 // common accessors and some code paths. | 2330 // common accessors and some code paths. |
| 2330 class FixedArrayBase: public HeapObject { | 2331 class FixedArrayBase: public HeapObject { |
| 2331 public: | 2332 public: |
| 2332 // [length]: length of the array. | 2333 // [length]: length of the array. |
| 2333 inline int length(); | 2334 inline int length(); |
| (...skipping 6705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9039 } else { | 9040 } else { |
| 9040 value &= ~(1 << bit_position); | 9041 value &= ~(1 << bit_position); |
| 9041 } | 9042 } |
| 9042 return value; | 9043 return value; |
| 9043 } | 9044 } |
| 9044 }; | 9045 }; |
| 9045 | 9046 |
| 9046 } } // namespace v8::internal | 9047 } } // namespace v8::internal |
| 9047 | 9048 |
| 9048 #endif // V8_OBJECTS_H_ | 9049 #endif // V8_OBJECTS_H_ |
| OLD | NEW |