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

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

Issue 2736923002: SnapshotCreator: start from existing snapshot if we have one (Closed)
Patch Set: addressed comments Created 3 years, 9 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/external-reference-table.cc ('k') | src/snapshot/code-serializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/code-serializer.h
diff --git a/src/snapshot/code-serializer.h b/src/snapshot/code-serializer.h
index 4d87a731f7587a1462fc506fbe440251762a948a..69f0f098159bad8730c1b4a7357533e919a63349 100644
--- a/src/snapshot/code-serializer.h
+++ b/src/snapshot/code-serializer.h
@@ -85,24 +85,25 @@ class SerializedCodeData : public SerializedData {
CPU_FEATURES_MISMATCH = 4,
FLAGS_MISMATCH = 5,
CHECKSUM_MISMATCH = 6,
- INVALID_HEADER = 7
+ INVALID_HEADER = 7,
+ LENGTH_MISMATCH = 8
};
// The data header consists of uint32_t-sized entries:
- // [0] magic number and external reference count
- // [1] version hash
- // [2] source hash
- // [3] cpu features
- // [4] flag hash
- // [5] number of code stub keys
- // [6] number of reservation size entries
- // [7] payload length
- // [8] payload checksum part 1
- // [9] payload checksum part 2
+ // [0] magic number and (internally provided) external reference count
+ // [1] extra (API-provided) external reference count
+ // [2] version hash
+ // [3] source hash
+ // [4] cpu features
+ // [5] flag hash
+ // [6] number of code stub keys
+ // [7] number of reservation size entries
+ // [8] payload length
+ // [9] payload checksum part 1
+ // [10] payload checksum part 2
// ... reservations
// ... code stub keys
// ... serialized payload
- static const int kVersionHashOffset = kMagicNumberOffset + kInt32Size;
static const int kSourceHashOffset = kVersionHashOffset + kInt32Size;
static const int kCpuFeaturesOffset = kSourceHashOffset + kInt32Size;
static const int kFlagHashOffset = kCpuFeaturesOffset + kInt32Size;
@@ -111,7 +112,8 @@ class SerializedCodeData : public SerializedData {
static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size;
static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size;
static const int kChecksum2Offset = kChecksum1Offset + kInt32Size;
- static const int kHeaderSize = kChecksum2Offset + kInt32Size;
+ static const int kUnalignedHeaderSize = kChecksum2Offset + kInt32Size;
+ static const int kHeaderSize = POINTER_SIZE_ALIGN(kUnalignedHeaderSize);
// Used when consuming.
static const SerializedCodeData FromCachedData(
« no previous file with comments | « src/external-reference-table.cc ('k') | src/snapshot/code-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698