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

Unified Diff: src/heap/slot-set.h

Issue 2360233002: [heap] Only insert new slot set entries. (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/slot-set.h
diff --git a/src/heap/slot-set.h b/src/heap/slot-set.h
index 6ba3174e3c42f71198bb851faa2de13cf1bd65ee..de732db454887a92817d01063a9978f9c18041ba 100644
--- a/src/heap/slot-set.h
+++ b/src/heap/slot-set.h
@@ -48,7 +48,9 @@ class SlotSet : public Malloced {
current_bucket = AllocateBucket();
bucket[bucket_index].SetValue(current_bucket);
}
- current_bucket[cell_index].SetBit(bit_index);
+ if (!(current_bucket[cell_index].Value() & (1u << bit_index))) {
+ current_bucket[cell_index].SetBit(bit_index);
+ }
}
// The slot offset specifies a slot at address page_start_ + slot_offset.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698