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

Unified Diff: src/objects.h

Issue 958023002: Store weak cell cache for map in the map itself. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix verification of normalized map Created 5 years, 10 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 | « src/heap/heap.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 4ead84866d9c9dfcedd9ef7376abda96d7596578..1a240f949ba084a5253bbad5418acb2cf2de98b2 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -5991,6 +5991,9 @@ class Map: public HeapObject {
// [dependent code]: list of optimized codes that weakly embed this map.
DECL_ACCESSORS(dependent_code, DependentCode)
+ // [weak cell cache]: cache that stores a weak cell pointing to this map.
+ DECL_ACCESSORS(weak_cell_cache, Object)
+
// [prototype transitions]: cache of prototype transitions.
// Prototype transition is a transition that happens
// when we change object's prototype to a new one.
@@ -6296,7 +6299,8 @@ class Map: public HeapObject {
static const int kCodeCacheOffset = kDescriptorsOffset + kPointerSize;
#endif
static const int kDependentCodeOffset = kCodeCacheOffset + kPointerSize;
- static const int kSize = kDependentCodeOffset + kPointerSize;
+ static const int kWeakCellCacheOffset = kDependentCodeOffset + kPointerSize;
+ static const int kSize = kWeakCellCacheOffset + kPointerSize;
// Layout of pointer fields. Heap iteration code relies on them
// being continuously allocated.
@@ -8108,7 +8112,6 @@ class CodeCache: public Struct {
public:
DECL_ACCESSORS(default_cache, FixedArray)
DECL_ACCESSORS(normal_type_cache, Object)
- DECL_ACCESSORS(weak_cell_cache, Object)
// Add the code object to the cache.
static void Update(
@@ -8136,8 +8139,7 @@ class CodeCache: public Struct {
static const int kDefaultCacheOffset = HeapObject::kHeaderSize;
static const int kNormalTypeCacheOffset =
kDefaultCacheOffset + kPointerSize;
- static const int kWeakCellCacheOffset = kNormalTypeCacheOffset + kPointerSize;
- static const int kSize = kWeakCellCacheOffset + kPointerSize;
+ static const int kSize = kNormalTypeCacheOffset + kPointerSize;
private:
static void UpdateDefaultCache(
« no previous file with comments | « src/heap/heap.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698