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

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

Issue 2160613002: [heap] Remove black pages and use black areas instead. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: perform cast after writing map Created 4 years, 5 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/ia32/assembler-ia32-inl.h ('k') | test/unittests/heap/marking-unittest.cc » ('j') | 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 1976 matching lines...) Expand 10 before | Expand all | Expand 10 after
1987 this == GetHeap()->empty_weak_cell()); 1987 this == GetHeap()->empty_weak_cell());
1988 WRITE_FIELD(this, kValueOffset, Smi::FromInt(0)); 1988 WRITE_FIELD(this, kValueOffset, Smi::FromInt(0));
1989 } 1989 }
1990 1990
1991 1991
1992 void WeakCell::initialize(HeapObject* val) { 1992 void WeakCell::initialize(HeapObject* val) {
1993 WRITE_FIELD(this, kValueOffset, val); 1993 WRITE_FIELD(this, kValueOffset, val);
1994 // We just have to execute the generational barrier here because we never 1994 // We just have to execute the generational barrier here because we never
1995 // mark through a weak cell and collect evacuation candidates when we process 1995 // mark through a weak cell and collect evacuation candidates when we process
1996 // all weak cells. 1996 // all weak cells.
1997 WriteBarrierMode mode = 1997 WriteBarrierMode mode = Marking::IsBlack(ObjectMarking::MarkBitFrom(this))
1998 Page::FromAddress(this->address())->IsFlagSet(Page::BLACK_PAGE) 1998 ? UPDATE_WRITE_BARRIER
1999 ? UPDATE_WRITE_BARRIER 1999 : UPDATE_WEAK_WRITE_BARRIER;
2000 : UPDATE_WEAK_WRITE_BARRIER;
2001 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kValueOffset, val, mode); 2000 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kValueOffset, val, mode);
2002 } 2001 }
2003 2002
2004 2003
2005 bool WeakCell::cleared() const { return value() == Smi::FromInt(0); } 2004 bool WeakCell::cleared() const { return value() == Smi::FromInt(0); }
2006 2005
2007 2006
2008 Object* WeakCell::next() const { return READ_FIELD(this, kNextOffset); } 2007 Object* WeakCell::next() const { return READ_FIELD(this, kNextOffset); }
2009 2008
2010 2009
(...skipping 6107 matching lines...) Expand 10 before | Expand all | Expand 10 after
8118 #undef WRITE_INT64_FIELD 8117 #undef WRITE_INT64_FIELD
8119 #undef READ_BYTE_FIELD 8118 #undef READ_BYTE_FIELD
8120 #undef WRITE_BYTE_FIELD 8119 #undef WRITE_BYTE_FIELD
8121 #undef NOBARRIER_READ_BYTE_FIELD 8120 #undef NOBARRIER_READ_BYTE_FIELD
8122 #undef NOBARRIER_WRITE_BYTE_FIELD 8121 #undef NOBARRIER_WRITE_BYTE_FIELD
8123 8122
8124 } // namespace internal 8123 } // namespace internal
8125 } // namespace v8 8124 } // namespace v8
8126 8125
8127 #endif // V8_OBJECTS_INL_H_ 8126 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32-inl.h ('k') | test/unittests/heap/marking-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698