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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 #define NOBARRIER_WRITE_FIELD(p, offset, value) \ | 1141 #define NOBARRIER_WRITE_FIELD(p, offset, value) \ |
1142 base::NoBarrier_Store( \ | 1142 base::NoBarrier_Store( \ |
1143 reinterpret_cast<base::AtomicWord*>(FIELD_ADDR(p, offset)), \ | 1143 reinterpret_cast<base::AtomicWord*>(FIELD_ADDR(p, offset)), \ |
1144 reinterpret_cast<base::AtomicWord>(value)); | 1144 reinterpret_cast<base::AtomicWord>(value)); |
1145 | 1145 |
1146 #define WRITE_BARRIER(heap, object, offset, value) \ | 1146 #define WRITE_BARRIER(heap, object, offset, value) \ |
1147 heap->incremental_marking()->RecordWrite( \ | 1147 heap->incremental_marking()->RecordWrite( \ |
1148 object, HeapObject::RawField(object, offset), value); \ | 1148 object, HeapObject::RawField(object, offset), value); \ |
1149 heap->RecordWrite(object, offset, value); | 1149 heap->RecordWrite(object, offset, value); |
1150 | 1150 |
1151 #define FIXED_ARRAY_ELEMENTS_WRITE_BARRIER(heap, array, start, length) \ | |
1152 do { \ | |
1153 heap->RecordFixedArrayElements(array, start, length); \ | |
1154 heap->incremental_marking()->IterateBlackObject(array); \ | |
1155 } while (false) | |
1156 | |
1157 #define CONDITIONAL_WRITE_BARRIER(heap, object, offset, value, mode) \ | 1151 #define CONDITIONAL_WRITE_BARRIER(heap, object, offset, value, mode) \ |
1158 if (mode != SKIP_WRITE_BARRIER) { \ | 1152 if (mode != SKIP_WRITE_BARRIER) { \ |
1159 if (mode == UPDATE_WRITE_BARRIER) { \ | 1153 if (mode == UPDATE_WRITE_BARRIER) { \ |
1160 heap->incremental_marking()->RecordWrite( \ | 1154 heap->incremental_marking()->RecordWrite( \ |
1161 object, HeapObject::RawField(object, offset), value); \ | 1155 object, HeapObject::RawField(object, offset), value); \ |
1162 } \ | 1156 } \ |
1163 heap->RecordWrite(object, offset, value); \ | 1157 heap->RecordWrite(object, offset, value); \ |
1164 } | 1158 } |
1165 | 1159 |
1166 #define READ_DOUBLE_FIELD(p, offset) \ | 1160 #define READ_DOUBLE_FIELD(p, offset) \ |
(...skipping 6663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7830 #undef WRITE_INT64_FIELD | 7824 #undef WRITE_INT64_FIELD |
7831 #undef READ_BYTE_FIELD | 7825 #undef READ_BYTE_FIELD |
7832 #undef WRITE_BYTE_FIELD | 7826 #undef WRITE_BYTE_FIELD |
7833 #undef NOBARRIER_READ_BYTE_FIELD | 7827 #undef NOBARRIER_READ_BYTE_FIELD |
7834 #undef NOBARRIER_WRITE_BYTE_FIELD | 7828 #undef NOBARRIER_WRITE_BYTE_FIELD |
7835 | 7829 |
7836 } // namespace internal | 7830 } // namespace internal |
7837 } // namespace v8 | 7831 } // namespace v8 |
7838 | 7832 |
7839 #endif // V8_OBJECTS_INL_H_ | 7833 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |