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_WRITE_BARRIER(heap, array, start, length) \ | |
Hannes Payer (out of office)
2016/04/01 11:34:40
FIXED_ARRAY_ELEMENTS_WRITE_BARRIER
Camillo Bruni
2016/04/01 13:45:02
done.
| |
1152 heap->RecordWrites(array, start, length); \ | |
ulan
2016/04/01 11:28:32
Let's put the two statements in
do {
} while (fa
Camillo Bruni
2016/04/01 13:45:02
done.
| |
1153 heap->incremental_marking()->IterateBlackObject(array) | |
1154 | |
1151 #define CONDITIONAL_WRITE_BARRIER(heap, object, offset, value, mode) \ | 1155 #define CONDITIONAL_WRITE_BARRIER(heap, object, offset, value, mode) \ |
1152 if (mode != SKIP_WRITE_BARRIER) { \ | 1156 if (mode != SKIP_WRITE_BARRIER) { \ |
1153 if (mode == UPDATE_WRITE_BARRIER) { \ | 1157 if (mode == UPDATE_WRITE_BARRIER) { \ |
1154 heap->incremental_marking()->RecordWrite( \ | 1158 heap->incremental_marking()->RecordWrite( \ |
1155 object, HeapObject::RawField(object, offset), value); \ | 1159 object, HeapObject::RawField(object, offset), value); \ |
1156 } \ | 1160 } \ |
1157 heap->RecordWrite(object, offset, value); \ | 1161 heap->RecordWrite(object, offset, value); \ |
1158 } | 1162 } |
1159 | 1163 |
1160 #define READ_DOUBLE_FIELD(p, offset) \ | 1164 #define READ_DOUBLE_FIELD(p, offset) \ |
(...skipping 6663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7824 #undef WRITE_INT64_FIELD | 7828 #undef WRITE_INT64_FIELD |
7825 #undef READ_BYTE_FIELD | 7829 #undef READ_BYTE_FIELD |
7826 #undef WRITE_BYTE_FIELD | 7830 #undef WRITE_BYTE_FIELD |
7827 #undef NOBARRIER_READ_BYTE_FIELD | 7831 #undef NOBARRIER_READ_BYTE_FIELD |
7828 #undef NOBARRIER_WRITE_BYTE_FIELD | 7832 #undef NOBARRIER_WRITE_BYTE_FIELD |
7829 | 7833 |
7830 } // namespace internal | 7834 } // namespace internal |
7831 } // namespace v8 | 7835 } // namespace v8 |
7832 | 7836 |
7833 #endif // V8_OBJECTS_INL_H_ | 7837 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |