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

Unified Diff: src/snapshot/serialize.h

Issue 1213203007: Create a internal, global native context used only for generated code stubs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback Created 5 years, 5 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/snapshot/natives-external.cc ('k') | src/snapshot/serialize.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 001d7753922915989cb059888ed11579db4c5c8f..6510f9b56ff771896843872d765f4d63482c793a 100644
--- a/src/snapshot/serialize.h
+++ b/src/snapshot/serialize.h
@@ -396,8 +396,11 @@ class SerializerDeserializer: public ObjectVisitor {
static const int kVariableRepeat = 0x77;
// Alignment prefixes 0x7d..0x7f
static const int kAlignmentPrefix = 0x7d;
+ // Used for the source code for compiled stubs, which is in the executable,
+ // but is referred to from external strings in the snapshot.
+ static const int kCodeStubNativesStringResource = 0x5d;
- // 0x5d..0x5f unused
+ // 0x5e..0x5f unused
// ---------- byte code range 0x80..0xff ----------
// First 32 root array items.
@@ -587,6 +590,9 @@ class Deserializer: public SerializerDeserializer {
// snapshot by chunk index and offset.
HeapObject* GetBackReferencedObject(int space);
+ Object** CopyInNativesSource(Vector<const char> source_vector,
+ Object** current);
+
// Cached current isolate.
Isolate* isolate_;
@@ -675,6 +681,11 @@ class Serializer : public SerializerDeserializer {
private:
void SerializePrologue(AllocationSpace space, int size, Map* map);
+ bool SerializeExternalNativeSourceString(
+ int builtin_count,
+ v8::String::ExternalOneByteStringResource** resource_pointer,
+ FixedArray* source_cache, int resource_index);
+
enum ReturnSkip { kCanReturnSkipInsteadOfSkipping, kIgnoringReturn };
// This function outputs or skips the raw data between the last pointer and
// up to the current position. It optionally can just return the number of
« no previous file with comments | « src/snapshot/natives-external.cc ('k') | src/snapshot/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698