| 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 // Review notes: | 5 // Review notes: |
| 6 // | 6 // |
| 7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
| 8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
| 9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
| 10 // | 10 // |
| (...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1902 | 1902 |
| 1903 Object* WeakCell::value() const { return READ_FIELD(this, kValueOffset); } | 1903 Object* WeakCell::value() const { return READ_FIELD(this, kValueOffset); } |
| 1904 | 1904 |
| 1905 | 1905 |
| 1906 void WeakCell::clear() { | 1906 void WeakCell::clear() { |
| 1907 DCHECK(GetHeap()->gc_state() == Heap::MARK_COMPACT); | 1907 DCHECK(GetHeap()->gc_state() == Heap::MARK_COMPACT); |
| 1908 WRITE_FIELD(this, kValueOffset, Smi::FromInt(0)); | 1908 WRITE_FIELD(this, kValueOffset, Smi::FromInt(0)); |
| 1909 } | 1909 } |
| 1910 | 1910 |
| 1911 | 1911 |
| 1912 void WeakCell::unchecked_clear() { |
| 1913 WRITE_FIELD(this, kValueOffset, Smi::FromInt(0)); |
| 1914 } |
| 1915 |
| 1916 |
| 1912 void WeakCell::initialize(HeapObject* val) { | 1917 void WeakCell::initialize(HeapObject* val) { |
| 1913 WRITE_FIELD(this, kValueOffset, val); | 1918 WRITE_FIELD(this, kValueOffset, val); |
| 1914 WRITE_BARRIER(GetHeap(), this, kValueOffset, val); | 1919 WRITE_BARRIER(GetHeap(), this, kValueOffset, val); |
| 1915 } | 1920 } |
| 1916 | 1921 |
| 1917 | 1922 |
| 1918 bool WeakCell::cleared() const { return value() == Smi::FromInt(0); } | 1923 bool WeakCell::cleared() const { return value() == Smi::FromInt(0); } |
| 1919 | 1924 |
| 1920 | 1925 |
| 1921 Object* WeakCell::next() const { return READ_FIELD(this, kNextOffset); } | 1926 Object* WeakCell::next() const { return READ_FIELD(this, kNextOffset); } |
| (...skipping 5622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7544 #undef READ_SHORT_FIELD | 7549 #undef READ_SHORT_FIELD |
| 7545 #undef WRITE_SHORT_FIELD | 7550 #undef WRITE_SHORT_FIELD |
| 7546 #undef READ_BYTE_FIELD | 7551 #undef READ_BYTE_FIELD |
| 7547 #undef WRITE_BYTE_FIELD | 7552 #undef WRITE_BYTE_FIELD |
| 7548 #undef NOBARRIER_READ_BYTE_FIELD | 7553 #undef NOBARRIER_READ_BYTE_FIELD |
| 7549 #undef NOBARRIER_WRITE_BYTE_FIELD | 7554 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7550 | 7555 |
| 7551 } } // namespace v8::internal | 7556 } } // namespace v8::internal |
| 7552 | 7557 |
| 7553 #endif // V8_OBJECTS_INL_H_ | 7558 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |