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

Unified Diff: src/snapshot/serializer.h

Issue 2799943002: Handle ExternalStrings directly in the serializer without ObjectVisitor. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: src/snapshot/serializer.h
diff --git a/src/snapshot/serializer.h b/src/snapshot/serializer.h
index f00b1e1f060ee412965bf682b21d6d6575c39bab..a5131acbf9f9419e2afffdebe34c9d72f169e133 100644
--- a/src/snapshot/serializer.h
+++ b/src/snapshot/serializer.h
@@ -290,24 +290,12 @@ class Serializer::ObjectSerializer : public ObjectVisitor {
void VisitCodeEntry(Address entry_address) override;
void VisitCell(RelocInfo* rinfo) override;
void VisitRuntimeEntry(RelocInfo* reloc) override;
- // Used for seralizing the external strings that hold the natives source.
- void VisitExternalOneByteString(
- v8::String::ExternalOneByteStringResource** resource) override;
- // We can't serialize a heap with external two byte strings.
- void VisitExternalTwoByteString(
- v8::String::ExternalStringResource** resource) override {
- UNREACHABLE();
- }
private:
bool TryEncodeDeoptimizationEntry(HowToCode how_to_code, Address target,
int skip);
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
@@ -315,8 +303,12 @@ class Serializer::ObjectSerializer : public ObjectVisitor {
// bytes to skip instead of performing a skip instruction, in case the skip
// can be merged into the next instruction.
int OutputRawData(Address up_to, ReturnSkip return_skip = kIgnoringReturn);
- // External strings are serialized in a way to resemble sequential strings.
void SerializeExternalString();
+ void SerializeExternalStringAsSequentialString();
+ bool SerializeExternalNativeSourceString(
+ int builtin_count,
+ v8::String::ExternalOneByteStringResource** resource_pointer,
+ FixedArray* source_cache, int resource_index);
Address PrepareCode();

Powered by Google App Engine
This is Rietveld 408576698