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

Side by Side Diff: src/snapshot/code-serializer.h

Issue 2395793003: [wasm] Support recompilation if deserialization fails. (Closed)
Patch Set: Feedback Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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_SNAPSHOT_CODE_SERIALIZER_H_ 5 #ifndef V8_SNAPSHOT_CODE_SERIALIZER_H_
6 #define V8_SNAPSHOT_CODE_SERIALIZER_H_ 6 #define V8_SNAPSHOT_CODE_SERIALIZER_H_
7 7
8 #include "src/parsing/preparse-data.h" 8 #include "src/parsing/preparse-data.h"
9 #include "src/snapshot/serializer.h" 9 #include "src/snapshot/serializer.h"
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // Wrapper around ScriptData to provide code-serializer-specific functionality. 85 // Wrapper around ScriptData to provide code-serializer-specific functionality.
86 class SerializedCodeData : public SerializedData { 86 class SerializedCodeData : public SerializedData {
87 public: 87 public:
88 enum SanityCheckResult { 88 enum SanityCheckResult {
89 CHECK_SUCCESS = 0, 89 CHECK_SUCCESS = 0,
90 MAGIC_NUMBER_MISMATCH = 1, 90 MAGIC_NUMBER_MISMATCH = 1,
91 VERSION_MISMATCH = 2, 91 VERSION_MISMATCH = 2,
92 SOURCE_MISMATCH = 3, 92 SOURCE_MISMATCH = 3,
93 CPU_FEATURES_MISMATCH = 4, 93 CPU_FEATURES_MISMATCH = 4,
94 FLAGS_MISMATCH = 5, 94 FLAGS_MISMATCH = 5,
95 CHECKSUM_MISMATCH = 6 95 CHECKSUM_MISMATCH = 6,
96 INVALID_HEADER = 7
96 }; 97 };
97 98
98 // Used when consuming. 99 // Used when consuming.
99 static const SerializedCodeData FromCachedData( 100 static const SerializedCodeData FromCachedData(
100 Isolate* isolate, ScriptData* cached_data, uint32_t expected_source_hash, 101 Isolate* isolate, ScriptData* cached_data, uint32_t expected_source_hash,
101 SanityCheckResult* rejection_result); 102 SanityCheckResult* rejection_result);
102 103
103 // Used when producing. 104 // Used when producing.
104 SerializedCodeData(const List<byte>* payload, const CodeSerializer* cs); 105 SerializedCodeData(const List<byte>* payload, const CodeSerializer* cs);
105 106
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size; 148 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size;
148 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size; 149 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size;
149 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size; 150 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size;
150 static const int kHeaderSize = kChecksum2Offset + kInt32Size; 151 static const int kHeaderSize = kChecksum2Offset + kInt32Size;
151 }; 152 };
152 153
153 } // namespace internal 154 } // namespace internal
154 } // namespace v8 155 } // namespace v8
155 156
156 #endif // V8_SNAPSHOT_CODE_SERIALIZER_H_ 157 #endif // V8_SNAPSHOT_CODE_SERIALIZER_H_
OLDNEW
« src/api.cc ('K') | « src/api.cc ('k') | src/snapshot/code-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698