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 9556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9567 kSize> BodyDescriptor; | 9567 kSize> BodyDescriptor; |
9568 | 9568 |
9569 private: | 9569 private: |
9570 DECL_ACCESSORS(type_raw, Object) | 9570 DECL_ACCESSORS(type_raw, Object) |
9571 DISALLOW_IMPLICIT_CONSTRUCTORS(PropertyCell); | 9571 DISALLOW_IMPLICIT_CONSTRUCTORS(PropertyCell); |
9572 }; | 9572 }; |
9573 | 9573 |
9574 | 9574 |
9575 class WeakCell : public HeapObject { | 9575 class WeakCell : public HeapObject { |
9576 public: | 9576 public: |
9577 inline HeapObject* value() const; | 9577 inline Object* value() const; |
9578 | 9578 |
9579 // This should not be called by anyone except GC. | 9579 // This should not be called by anyone except GC. |
9580 inline void clear(HeapObject* undefined); | 9580 inline void clear(); |
9581 | 9581 |
9582 // This should not be called by anyone except allocator. | 9582 // This should not be called by anyone except allocator. |
9583 inline void initialize(HeapObject* value); | 9583 inline void initialize(HeapObject* value); |
9584 | 9584 |
| 9585 inline bool cleared() const; |
| 9586 |
9585 DECL_ACCESSORS(next, Object) | 9587 DECL_ACCESSORS(next, Object) |
9586 | 9588 |
9587 DECLARE_CAST(WeakCell) | 9589 DECLARE_CAST(WeakCell) |
9588 | 9590 |
9589 DECLARE_PRINTER(WeakCell) | 9591 DECLARE_PRINTER(WeakCell) |
9590 DECLARE_VERIFIER(WeakCell) | 9592 DECLARE_VERIFIER(WeakCell) |
9591 | 9593 |
9592 // Layout description. | 9594 // Layout description. |
9593 static const int kValueOffset = HeapObject::kHeaderSize; | 9595 static const int kValueOffset = HeapObject::kHeaderSize; |
9594 static const int kNextOffset = kValueOffset + kPointerSize; | 9596 static const int kNextOffset = kValueOffset + kPointerSize; |
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10899 } else { | 10901 } else { |
10900 value &= ~(1 << bit_position); | 10902 value &= ~(1 << bit_position); |
10901 } | 10903 } |
10902 return value; | 10904 return value; |
10903 } | 10905 } |
10904 }; | 10906 }; |
10905 | 10907 |
10906 } } // namespace v8::internal | 10908 } } // namespace v8::internal |
10907 | 10909 |
10908 #endif // V8_OBJECTS_H_ | 10910 #endif // V8_OBJECTS_H_ |
OLD | NEW |