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

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

Issue 2807023003: [snapshot] encode resource before serializing. (Closed)
Patch Set: fix Created 3 years, 8 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
« no previous file with comments | « src/snapshot/serializer.cc ('k') | test/cctest/test-serialize.cc » ('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 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_SERIALIZER_COMMON_H_ 5 #ifndef V8_SNAPSHOT_SERIALIZER_COMMON_H_
6 #define V8_SNAPSHOT_SERIALIZER_COMMON_H_ 6 #define V8_SNAPSHOT_SERIALIZER_COMMON_H_
7 7
8 #include "src/address-map.h" 8 #include "src/address-map.h"
9 #include "src/external-reference-table.h" 9 #include "src/external-reference-table.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // Examine the build process for architecture, version or configuration 159 // Examine the build process for architecture, version or configuration
160 // mismatches. 160 // mismatches.
161 static const int kSynchronize = 0x18; 161 static const int kSynchronize = 0x18;
162 // Repeats of variable length. 162 // Repeats of variable length.
163 static const int kVariableRepeat = 0x19; 163 static const int kVariableRepeat = 0x19;
164 // Raw data of variable length. 164 // Raw data of variable length.
165 static const int kVariableRawData = 0x1a; 165 static const int kVariableRawData = 0x1a;
166 // Internal reference encoded as offsets of pc and target from code entry. 166 // Internal reference encoded as offsets of pc and target from code entry.
167 static const int kInternalReference = 0x1b; 167 static const int kInternalReference = 0x1b;
168 static const int kInternalReferenceEncoded = 0x1c; 168 static const int kInternalReferenceEncoded = 0x1c;
169 // Used for the source code of the natives, which is in the executable, but 169 // Used to encode deoptimizer entry code.
170 // is referred to from external strings in the snapshot. 170 static const int kDeoptimizerEntryPlain = 0x1d;
171 static const int kNativesStringResource = 0x1d; 171 static const int kDeoptimizerEntryFromCode = 0x1e;
172 // Used for the source code for compiled stubs, which is in the executable,
173 // but is referred to from external strings in the snapshot.
174 static const int kExtraNativesStringResource = 0x1e;
175 // Used for embedder-provided serialization data for embedder fields. 172 // Used for embedder-provided serialization data for embedder fields.
176 static const int kEmbedderFieldsData = 0x1f; 173 static const int kEmbedderFieldsData = 0x1f;
177 174
178 // 8 hot (recently seen or back-referenced) objects with optional skip. 175 // 8 hot (recently seen or back-referenced) objects with optional skip.
179 static const int kNumberOfHotObjects = 8; 176 static const int kNumberOfHotObjects = 8;
180 STATIC_ASSERT(kNumberOfHotObjects == HotObjectsList::kSize); 177 STATIC_ASSERT(kNumberOfHotObjects == HotObjectsList::kSize);
181 // 0x38..0x3f 178 // 0x38..0x3f
182 static const int kHotObject = 0x38; 179 static const int kHotObject = 0x38;
183 // 0x58..0x5f 180 // 0x58..0x5f
184 static const int kHotObjectWithSkip = 0x58; 181 static const int kHotObjectWithSkip = 0x58;
185 static const int kHotObjectMask = 0x07; 182 static const int kHotObjectMask = 0x07;
186 183
187 static const int kDeoptimizerEntryPlain = 0x35; 184 // 0x35..0x37, 0x55..0x57, 0x75..0x7f unused.
188 static const int kDeoptimizerEntryFromCode = 0x36;
189
190 // 0x37, 0x55..0x57, 0x75..0x7f unused.
191 185
192 // ---------- byte code range 0x80..0xff ---------- 186 // ---------- byte code range 0x80..0xff ----------
193 // First 32 root array items. 187 // First 32 root array items.
194 static const int kNumberOfRootArrayConstants = 0x20; 188 static const int kNumberOfRootArrayConstants = 0x20;
195 // 0x80..0x9f 189 // 0x80..0x9f
196 static const int kRootArrayConstants = 0x80; 190 static const int kRootArrayConstants = 0x80;
197 // 0xa0..0xbf 191 // 0xa0..0xbf
198 static const int kRootArrayConstantsWithSkip = 0xa0; 192 static const int kRootArrayConstantsWithSkip = 0xa0;
199 static const int kRootArrayConstantsMask = 0x1f; 193 static const int kRootArrayConstantsMask = 0x1f;
200 194
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 bool owns_data_; 299 bool owns_data_;
306 300
307 private: 301 private:
308 DISALLOW_COPY_AND_ASSIGN(SerializedData); 302 DISALLOW_COPY_AND_ASSIGN(SerializedData);
309 }; 303 };
310 304
311 } // namespace internal 305 } // namespace internal
312 } // namespace v8 306 } // namespace v8
313 307
314 #endif // V8_SNAPSHOT_SERIALIZER_COMMON_H_ 308 #endif // V8_SNAPSHOT_SERIALIZER_COMMON_H_
OLDNEW
« no previous file with comments | « src/snapshot/serializer.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698