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

Side by Side Diff: src/objects.cc

Issue 1441453002: Avoid manual object's body traversal in GC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #include "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 os << "<Other heap object (" << map()->instance_type() << ")>"; 1996 os << "<Other heap object (" << map()->instance_type() << ")>";
1997 break; 1997 break;
1998 } 1998 }
1999 } 1999 }
2000 2000
2001 2001
2002 void HeapObject::Iterate(ObjectVisitor* v) { 2002 void HeapObject::Iterate(ObjectVisitor* v) {
2003 // Handle header 2003 // Handle header
2004 IteratePointer(v, kMapOffset); 2004 IteratePointer(v, kMapOffset);
2005 // Handle object body 2005 // Handle object body
2006 IterateBody(v);
2007 }
2008
2009
2010 void HeapObject::IterateBody(ObjectVisitor* v) {
2006 Map* m = map(); 2011 Map* m = map();
2007 IterateBody(m->instance_type(), SizeFromMap(m), v); 2012 IterateBody(m->instance_type(), SizeFromMap(m), v);
2008 } 2013 }
2009 2014
2010 2015
2011 bool HeapNumber::HeapNumberBooleanValue() { 2016 bool HeapNumber::HeapNumberBooleanValue() {
2012 return DoubleToBoolean(value()); 2017 return DoubleToBoolean(value());
2013 } 2018 }
2014 2019
2015 2020
(...skipping 15885 matching lines...) Expand 10 before | Expand all | Expand 10 after
17901 if (cell->value() != *new_value) { 17906 if (cell->value() != *new_value) {
17902 cell->set_value(*new_value); 17907 cell->set_value(*new_value);
17903 Isolate* isolate = cell->GetIsolate(); 17908 Isolate* isolate = cell->GetIsolate();
17904 cell->dependent_code()->DeoptimizeDependentCodeGroup( 17909 cell->dependent_code()->DeoptimizeDependentCodeGroup(
17905 isolate, DependentCode::kPropertyCellChangedGroup); 17910 isolate, DependentCode::kPropertyCellChangedGroup);
17906 } 17911 }
17907 } 17912 }
17908 17913
17909 } // namespace internal 17914 } // namespace internal
17910 } // namespace v8 17915 } // namespace v8
OLDNEW
« src/heap/objects-visiting.h ('K') | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698