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

Unified Diff: src/objects-inl.h

Issue 1506683004: Free one bit in Map by removing unused retaining counter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 | « src/objects.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index e1e3e48f9b5c1e847a6b650ea1ecdd88118cef8d..baa383c26e9bcafccd29773bcd18cc7f4a02a2b3 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -4754,12 +4754,14 @@ void Map::set_new_target_is_base(bool value) {
bool Map::new_target_is_base() { return NewTargetIsBase::decode(bit_field3()); }
-void Map::set_counter(int value) {
- set_bit_field3(Counter::update(bit_field3(), value));
+void Map::set_construction_counter(int value) {
+ set_bit_field3(ConstructionCounter::update(bit_field3(), value));
}
-int Map::counter() { return Counter::decode(bit_field3()); }
+int Map::construction_counter() {
+ return ConstructionCounter::decode(bit_field3());
+}
void Map::mark_unstable() {
@@ -6162,14 +6164,14 @@ void JSFunction::CompleteInobjectSlackTrackingIfActive() {
bool Map::IsInobjectSlackTrackingInProgress() {
- return counter() >= Map::kSlackTrackingCounterEnd;
+ return construction_counter() != Map::kNoSlackTracking;
}
void Map::InobjectSlackTrackingStep() {
if (!IsInobjectSlackTrackingInProgress()) return;
- int counter = this->counter();
- set_counter(counter - 1);
+ int counter = construction_counter();
+ set_construction_counter(counter - 1);
if (counter == kSlackTrackingCounterEnd) {
CompleteInobjectSlackTracking();
}
« no previous file with comments | « src/objects.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698