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 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 // new space, or if the value is an immortal immutable object, like the maps | 1676 // new space, or if the value is an immortal immutable object, like the maps |
1677 // of primitive (non-JS) objects like strings, heap numbers etc. | 1677 // of primitive (non-JS) objects like strings, heap numbers etc. |
1678 inline void set_map_no_write_barrier(Map* value); | 1678 inline void set_map_no_write_barrier(Map* value); |
1679 | 1679 |
1680 // Get the map using acquire load. | 1680 // Get the map using acquire load. |
1681 inline Map* synchronized_map(); | 1681 inline Map* synchronized_map(); |
1682 inline MapWord synchronized_map_word() const; | 1682 inline MapWord synchronized_map_word() const; |
1683 | 1683 |
1684 // Set the map using release store | 1684 // Set the map using release store |
1685 inline void synchronized_set_map(Map* value); | 1685 inline void synchronized_set_map(Map* value); |
1686 inline void synchronized_set_map_no_write_barrier(Map* value); | |
1687 inline void synchronized_set_map_word(MapWord map_word); | 1686 inline void synchronized_set_map_word(MapWord map_word); |
1688 | 1687 |
| 1688 // Initialize the map immediately after the object is allocated. |
| 1689 // Do not use this outside Heap. |
| 1690 inline void set_map_after_allocation( |
| 1691 Map* value, WriteBarrierMode mode = UPDATE_WRITE_BARRIER); |
| 1692 |
1689 // During garbage collection, the map word of a heap object does not | 1693 // During garbage collection, the map word of a heap object does not |
1690 // necessarily contain a map pointer. | 1694 // necessarily contain a map pointer. |
1691 inline MapWord map_word() const; | 1695 inline MapWord map_word() const; |
1692 inline void set_map_word(MapWord map_word); | 1696 inline void set_map_word(MapWord map_word); |
1693 | 1697 |
1694 // The Heap the object was allocated in. Used also to access Isolate. | 1698 // The Heap the object was allocated in. Used also to access Isolate. |
1695 inline Heap* GetHeap() const; | 1699 inline Heap* GetHeap() const; |
1696 | 1700 |
1697 // Convenience method to get current isolate. | 1701 // Convenience method to get current isolate. |
1698 inline Isolate* GetIsolate() const; | 1702 inline Isolate* GetIsolate() const; |
(...skipping 8516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10215 } | 10219 } |
10216 }; | 10220 }; |
10217 | 10221 |
10218 | 10222 |
10219 } // NOLINT, false-positive due to second-order macros. | 10223 } // NOLINT, false-positive due to second-order macros. |
10220 } // NOLINT, false-positive due to second-order macros. | 10224 } // NOLINT, false-positive due to second-order macros. |
10221 | 10225 |
10222 #include "src/objects/object-macros-undef.h" | 10226 #include "src/objects/object-macros-undef.h" |
10223 | 10227 |
10224 #endif // V8_OBJECTS_H_ | 10228 #endif // V8_OBJECTS_H_ |
OLD | NEW |