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

Unified Diff: src/snapshot/serializer-common.h

Issue 1992723002: [serializer] prepare attached references for general use. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: address comments Created 4 years, 7 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/snapshot/serializer.cc ('k') | src/snapshot/startup-serializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/serializer-common.h
diff --git a/src/snapshot/serializer-common.h b/src/snapshot/serializer-common.h
index 645a9af3bf647ded9672abfe47cb042b709601e1..1ce5cedfae89e27f2b67e78521efa92d1b7ecada 100644
--- a/src/snapshot/serializer-common.h
+++ b/src/snapshot/serializer-common.h
@@ -40,11 +40,13 @@ class HotObjectsList {
}
void Add(HeapObject* object) {
+ DCHECK(!AllowHeapAllocation::IsAllowed());
circular_queue_[index_] = object;
index_ = (index_ + 1) & kSizeMask;
}
HeapObject* Get(int index) {
+ DCHECK(!AllowHeapAllocation::IsAllowed());
DCHECK_NOT_NULL(circular_queue_[index]);
return circular_queue_[index];
}
@@ -52,6 +54,7 @@ class HotObjectsList {
static const int kNotFound = -1;
int Find(HeapObject* object) {
+ DCHECK(!AllowHeapAllocation::IsAllowed());
for (int i = 0; i < kSize; i++) {
if (circular_queue_[i] == object) return i;
}
@@ -211,12 +214,6 @@ class SerializerDeserializer : public ObjectVisitor {
// Sentinel after a new object to indicate that double alignment is needed.
static const int kDoubleAlignmentSentinel = 0;
- // Used as index for the attached reference representing the source object.
- static const int kSourceObjectReference = 0;
-
- // Used as index for the attached reference representing the global proxy.
- static const int kGlobalProxyReference = 0;
-
// ---------- member variable ----------
HotObjectsList hot_objects_;
};
« no previous file with comments | « src/snapshot/serializer.cc ('k') | src/snapshot/startup-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698