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

Unified Diff: runtime/vm/object_set.h

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object_service.cc ('k') | runtime/vm/object_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_set.h
diff --git a/runtime/vm/object_set.h b/runtime/vm/object_set.h
index f4031fb6c0959fceb1decba5019fdfae428c8dfb..a153377e74b1bd67559634ad965135ff5c63f3f5 100644
--- a/runtime/vm/object_set.h
+++ b/runtime/vm/object_set.h
@@ -19,8 +19,7 @@ class ObjectSetRegion : public ZoneAllocated {
: start_(start),
end_(end),
bit_vector_(zone, (end - start) >> kWordSizeLog2),
- next_(NULL) {
- }
+ next_(NULL) {}
bool ContainsAddress(uword address) {
return address >= start_ && address < end_;
@@ -31,9 +30,7 @@ class ObjectSetRegion : public ZoneAllocated {
return (address - start_) >> kWordSizeLog2;
}
- void AddObject(uword address) {
- bit_vector_.Add(IndexForAddress(address));
- }
+ void AddObject(uword address) { bit_vector_.Add(IndexForAddress(address)); }
bool ContainsObject(uword address) {
return bit_vector_.Contains(IndexForAddress(address));
@@ -51,18 +48,17 @@ class ObjectSetRegion : public ZoneAllocated {
class ObjectSet : public ZoneAllocated {
public:
- explicit ObjectSet(Zone* zone) : zone_(zone), head_(NULL) { }
+ explicit ObjectSet(Zone* zone) : zone_(zone), head_(NULL) {}
void AddRegion(uword start, uword end) {
- ObjectSetRegion* region = new(zone_) ObjectSetRegion(zone_, start, end);
+ ObjectSetRegion* region = new (zone_) ObjectSetRegion(zone_, start, end);
region->set_next(head_);
head_ = region;
}
bool Contains(RawObject* raw_obj) const {
uword raw_addr = RawObject::ToAddr(raw_obj);
- for (ObjectSetRegion* region = head_;
- region != NULL;
+ for (ObjectSetRegion* region = head_; region != NULL;
region = region->next()) {
if (region->ContainsAddress(raw_addr)) {
return region->ContainsObject(raw_addr);
@@ -73,8 +69,7 @@ class ObjectSet : public ZoneAllocated {
void Add(RawObject* raw_obj) {
uword raw_addr = RawObject::ToAddr(raw_obj);
- for (ObjectSetRegion* region = head_;
- region != NULL;
+ for (ObjectSetRegion* region = head_; region != NULL;
region = region->next()) {
if (region->ContainsAddress(raw_addr)) {
return region->AddObject(raw_addr);
« no previous file with comments | « runtime/vm/object_service.cc ('k') | runtime/vm/object_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698