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

Unified Diff: src/objects.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/mips64/builtins-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 72b077bdb8e285ea8df77d33a60479735575524b..fec6c1dce70177ba432c6916d9b8dae50fab6b63 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -5484,17 +5484,18 @@ class Map: public HeapObject {
class IsMigrationTarget : public BitField<bool, 25, 1> {};
class IsStrong : public BitField<bool, 26, 1> {};
class NewTargetIsBase : public BitField<bool, 27, 1> {};
+ // Bit 28 is free.
// Keep this bit field at the very end for better code in
// Builtins::kJSConstructStubGeneric stub.
- // This counter is used for in-object slack tracking and for map aging.
+ // This counter is used for in-object slack tracking.
// The in-object slack tracking is considered enabled when the counter is
- // in the range [kSlackTrackingCounterStart, kSlackTrackingCounterEnd].
- class Counter : public BitField<int, 28, 4> {};
- static const int kSlackTrackingCounterStart = 14;
- static const int kSlackTrackingCounterEnd = 8;
- static const int kRetainingCounterStart = kSlackTrackingCounterEnd - 1;
- static const int kRetainingCounterEnd = 0;
+ // non zero.
+ class ConstructionCounter : public BitField<int, 29, 3> {};
+ static const int kSlackTrackingCounterStart = 7;
+ static const int kSlackTrackingCounterEnd = 1;
+ static const int kNoSlackTracking = 0;
+ STATIC_ASSERT(kSlackTrackingCounterStart <= ConstructionCounter::kMax);
// Inobject slack tracking is the way to reclaim unused inobject space.
@@ -5763,8 +5764,8 @@ class Map: public HeapObject {
inline bool is_stable();
inline void set_migration_target(bool value);
inline bool is_migration_target();
- inline void set_counter(int value);
- inline int counter();
+ inline void set_construction_counter(int value);
+ inline int construction_counter();
inline void deprecate();
inline bool is_deprecated();
inline bool CanBeDeprecated();
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698