OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1552 #else | 1552 #else |
1553 void Print() { ShortPrint(); } | 1553 void Print() { ShortPrint(); } |
1554 void Print(std::ostream& os) { ShortPrint(os); } // NOLINT | 1554 void Print(std::ostream& os) { ShortPrint(os); } // NOLINT |
1555 #endif | 1555 #endif |
1556 | 1556 |
1557 private: | 1557 private: |
1558 friend class LookupIterator; | 1558 friend class LookupIterator; |
1559 friend class StringStream; | 1559 friend class StringStream; |
1560 | 1560 |
1561 // Return the map of the root of object's prototype chain. | 1561 // Return the map of the root of object's prototype chain. |
1562 Map* GetRootMap(Isolate* isolate); | 1562 Map* GetPrototypeChainRootMap(Isolate* isolate); |
1563 | 1563 |
1564 // Helper for SetProperty and SetSuperProperty. | 1564 // Helper for SetProperty and SetSuperProperty. |
1565 // Return value is only meaningful if [found] is set to true on return. | 1565 // Return value is only meaningful if [found] is set to true on return. |
1566 MUST_USE_RESULT static Maybe<bool> SetPropertyInternal( | 1566 MUST_USE_RESULT static Maybe<bool> SetPropertyInternal( |
1567 LookupIterator* it, Handle<Object> value, LanguageMode language_mode, | 1567 LookupIterator* it, Handle<Object> value, LanguageMode language_mode, |
1568 StoreFromKeyed store_mode, bool* found); | 1568 StoreFromKeyed store_mode, bool* found); |
1569 | 1569 |
1570 MUST_USE_RESULT static MaybeHandle<Name> ConvertToName(Isolate* isolate, | 1570 MUST_USE_RESULT static MaybeHandle<Name> ConvertToName(Isolate* isolate, |
1571 Handle<Object> input); | 1571 Handle<Object> input); |
1572 | 1572 |
(...skipping 4752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6325 | 6325 |
6326 // [prototype chain validity cell]: Associated with a prototype object, | 6326 // [prototype chain validity cell]: Associated with a prototype object, |
6327 // stored in that object's map's PrototypeInfo, indicates that prototype | 6327 // stored in that object's map's PrototypeInfo, indicates that prototype |
6328 // chains through this object are currently valid. The cell will be | 6328 // chains through this object are currently valid. The cell will be |
6329 // invalidated and replaced when the prototype chain changes. | 6329 // invalidated and replaced when the prototype chain changes. |
6330 static Handle<Cell> GetOrCreatePrototypeChainValidityCell(Handle<Map> map, | 6330 static Handle<Cell> GetOrCreatePrototypeChainValidityCell(Handle<Map> map, |
6331 Isolate* isolate); | 6331 Isolate* isolate); |
6332 static const int kPrototypeChainValid = 0; | 6332 static const int kPrototypeChainValid = 0; |
6333 static const int kPrototypeChainInvalid = 1; | 6333 static const int kPrototypeChainInvalid = 1; |
6334 | 6334 |
| 6335 // Return the map of the root of object's prototype chain. |
| 6336 Map* GetPrototypeChainRootMap(Isolate* isolate); |
| 6337 |
6335 // Returns a WeakCell object containing given prototype. The cell is cached | 6338 // Returns a WeakCell object containing given prototype. The cell is cached |
6336 // in PrototypeInfo which is created lazily. | 6339 // in PrototypeInfo which is created lazily. |
6337 static Handle<WeakCell> GetOrCreatePrototypeWeakCell( | 6340 static Handle<WeakCell> GetOrCreatePrototypeWeakCell( |
6338 Handle<JSObject> prototype, Isolate* isolate); | 6341 Handle<JSObject> prototype, Isolate* isolate); |
6339 | 6342 |
6340 Map* FindRootMap(); | 6343 Map* FindRootMap(); |
6341 Map* FindFieldOwner(int descriptor); | 6344 Map* FindFieldOwner(int descriptor); |
6342 | 6345 |
6343 inline int GetInObjectPropertyOffset(int index); | 6346 inline int GetInObjectPropertyOffset(int index); |
6344 | 6347 |
(...skipping 5415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11760 } | 11763 } |
11761 return value; | 11764 return value; |
11762 } | 11765 } |
11763 }; | 11766 }; |
11764 | 11767 |
11765 | 11768 |
11766 } // NOLINT, false-positive due to second-order macros. | 11769 } // NOLINT, false-positive due to second-order macros. |
11767 } // NOLINT, false-positive due to second-order macros. | 11770 } // NOLINT, false-positive due to second-order macros. |
11768 | 11771 |
11769 #endif // V8_OBJECTS_H_ | 11772 #endif // V8_OBJECTS_H_ |
OLD | NEW |