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

Unified Diff: src/snapshot/serialize.h

Issue 1268333004: Introduce object visitor to estimate the size of a native context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix compare Created 5 years, 4 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/context-measure.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/serialize.h
diff --git a/src/snapshot/serialize.h b/src/snapshot/serialize.h
index 6510f9b56ff771896843872d765f4d63482c793a..c92683dfccc035e566c46f36cc6d52e01ae49117 100644
--- a/src/snapshot/serialize.h
+++ b/src/snapshot/serialize.h
@@ -6,7 +6,6 @@
#define V8_SNAPSHOT_SERIALIZE_H_
#include "src/hashmap.h"
-#include "src/heap-profiler.h"
#include "src/isolate.h"
#include "src/snapshot/snapshot-source-sink.h"
@@ -156,6 +155,8 @@ class BackReference {
ChunkOffsetBits::encode(index));
}
+ static BackReference DummyReference() { return BackReference(kDummyValue); }
+
static BackReference Reference(AllocationSpace space, uint32_t chunk_index,
uint32_t chunk_offset) {
DCHECK(IsAligned(chunk_offset, kObjectAlignment));
@@ -201,6 +202,7 @@ class BackReference {
static const uint32_t kInvalidValue = 0xFFFFFFFF;
static const uint32_t kSourceValue = 0xFFFFFFFE;
static const uint32_t kGlobalProxyValue = 0xFFFFFFFD;
+ static const uint32_t kDummyValue = 0xFFFFFFFC;
static const int kChunkOffsetSize = kPageSizeBits - kObjectAlignmentBits;
static const int kChunkIndexSize = 32 - kChunkOffsetSize - kSpaceTagSize;
« no previous file with comments | « src/context-measure.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698