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

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

Issue 2637403011: Reland "[heap] Provide ObjectMarking with marking transitions" (Closed)
Patch Set: Add comment Created 3 years, 11 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/spaces.cc ('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 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after
2114 this == GetHeap()->empty_weak_cell()); 2114 this == GetHeap()->empty_weak_cell());
2115 WRITE_FIELD(this, kValueOffset, Smi::kZero); 2115 WRITE_FIELD(this, kValueOffset, Smi::kZero);
2116 } 2116 }
2117 2117
2118 2118
2119 void WeakCell::initialize(HeapObject* val) { 2119 void WeakCell::initialize(HeapObject* val) {
2120 WRITE_FIELD(this, kValueOffset, val); 2120 WRITE_FIELD(this, kValueOffset, val);
2121 // We just have to execute the generational barrier here because we never 2121 // We just have to execute the generational barrier here because we never
2122 // mark through a weak cell and collect evacuation candidates when we process 2122 // mark through a weak cell and collect evacuation candidates when we process
2123 // all weak cells. 2123 // all weak cells.
2124 WriteBarrierMode mode = Marking::IsBlack(ObjectMarking::MarkBitFrom(this)) 2124 WriteBarrierMode mode = ObjectMarking::IsBlack(this)
2125 ? UPDATE_WRITE_BARRIER 2125 ? UPDATE_WRITE_BARRIER
2126 : UPDATE_WEAK_WRITE_BARRIER; 2126 : UPDATE_WEAK_WRITE_BARRIER;
2127 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kValueOffset, val, mode); 2127 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kValueOffset, val, mode);
2128 } 2128 }
2129 2129
2130 bool WeakCell::cleared() const { return value() == Smi::kZero; } 2130 bool WeakCell::cleared() const { return value() == Smi::kZero; }
2131 2131
2132 Object* WeakCell::next() const { return READ_FIELD(this, kNextOffset); } 2132 Object* WeakCell::next() const { return READ_FIELD(this, kNextOffset); }
2133 2133
2134 2134
(...skipping 6284 matching lines...) Expand 10 before | Expand all | Expand 10 after
8419 #undef WRITE_INT64_FIELD 8419 #undef WRITE_INT64_FIELD
8420 #undef READ_BYTE_FIELD 8420 #undef READ_BYTE_FIELD
8421 #undef WRITE_BYTE_FIELD 8421 #undef WRITE_BYTE_FIELD
8422 #undef NOBARRIER_READ_BYTE_FIELD 8422 #undef NOBARRIER_READ_BYTE_FIELD
8423 #undef NOBARRIER_WRITE_BYTE_FIELD 8423 #undef NOBARRIER_WRITE_BYTE_FIELD
8424 8424
8425 } // namespace internal 8425 } // namespace internal
8426 } // namespace v8 8426 } // namespace v8
8427 8427
8428 #endif // V8_OBJECTS_INL_H_ 8428 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/heap/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698