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

Side by Side Diff: src/serialize.h

Issue 792563002: Revert of Use same blob format for internal and external snapshots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « src/natives-external.cc ('k') | src/snapshot.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_SERIALIZE_H_ 5 #ifndef V8_SERIALIZE_H_
6 #define V8_SERIALIZE_H_ 6 #define V8_SERIALIZE_H_
7 7
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/hashmap.h" 9 #include "src/hashmap.h"
10 #include "src/heap-profiler.h" 10 #include "src/heap-profiler.h"
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 }; 858 };
859 859
860 860
861 // Wrapper around reservation sizes and the serialization payload. 861 // Wrapper around reservation sizes and the serialization payload.
862 class SnapshotData : public SerializedData { 862 class SnapshotData : public SerializedData {
863 public: 863 public:
864 // Used when producing. 864 // Used when producing.
865 SnapshotData(const SnapshotByteSink& sink, const Serializer& ser); 865 SnapshotData(const SnapshotByteSink& sink, const Serializer& ser);
866 866
867 // Used when consuming. 867 // Used when consuming.
868 explicit SnapshotData(const Vector<const byte> snapshot) 868 explicit SnapshotData(const byte* data, int size)
869 : SerializedData(const_cast<byte*>(snapshot.begin()), snapshot.length()) { 869 : SerializedData(const_cast<byte*>(data), size) {
870 CHECK(IsSane()); 870 CHECK(IsSane());
871 } 871 }
872 872
873 Vector<const Reservation> Reservations() const; 873 Vector<const Reservation> Reservations() const;
874 Vector<const byte> Payload() const; 874 Vector<const byte> Payload() const;
875 875
876 Vector<const byte> RawData() const { 876 Vector<const byte> RawData() const {
877 return Vector<const byte>(data_, size_); 877 return Vector<const byte>(data_, size_);
878 } 878 }
879 879
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 static const int kCheckSumOffset = 0; 933 static const int kCheckSumOffset = 0;
934 static const int kNumInternalizedStringsOffset = 1; 934 static const int kNumInternalizedStringsOffset = 1;
935 static const int kReservationsOffset = 2; 935 static const int kReservationsOffset = 2;
936 static const int kNumCodeStubKeysOffset = 3; 936 static const int kNumCodeStubKeysOffset = 3;
937 static const int kPayloadLengthOffset = 4; 937 static const int kPayloadLengthOffset = 4;
938 static const int kHeaderSize = (kPayloadLengthOffset + 1) * kIntSize; 938 static const int kHeaderSize = (kPayloadLengthOffset + 1) * kIntSize;
939 }; 939 };
940 } } // namespace v8::internal 940 } } // namespace v8::internal
941 941
942 #endif // V8_SERIALIZE_H_ 942 #endif // V8_SERIALIZE_H_
OLDNEW
« no previous file with comments | « src/natives-external.cc ('k') | src/snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698