Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: src/objects-inl.h

Issue 1860443003: Revert of [heap] Add optimized RecordWrites (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/heap-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/heap/heap-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698