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

Unified Diff: src/serialize.cc

Issue 293993021: Support external startup data in V8. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 6 years, 7 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/serialize.cc
diff --git a/src/serialize.cc b/src/serialize.cc
index 2b43c0ee69a9f09ed972f815727a549d63a8ddd1..f8d901ffbb8992f47599a4e353a500be5d45a4f9 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -16,6 +16,7 @@
#include "runtime.h"
#include "serialize.h"
#include "snapshot.h"
+#include "snapshot-source-sink.h"
Benedikt Meurer 2014/05/27 04:09:59 Nit: serialize.h already includes snapshout-source
vogelheim 2014/05/27 15:20:23 Done.
#include "stub-cache.h"
#include "v8threads.h"
@@ -1245,19 +1246,6 @@ void Deserializer::ReadChunk(Object** current,
}
-void SnapshotByteSink::PutInt(uintptr_t integer, const char* description) {
- ASSERT(integer < 1 << 22);
- integer <<= 2;
- int bytes = 1;
- if (integer > 0xff) bytes = 2;
- if (integer > 0xffff) bytes = 3;
- integer |= bytes;
- Put(static_cast<int>(integer & 0xff), "IntPart1");
- if (bytes > 1) Put(static_cast<int>((integer >> 8) & 0xff), "IntPart2");
- if (bytes > 2) Put(static_cast<int>((integer >> 16) & 0xff), "IntPart3");
-}
-
-
Serializer::Serializer(Isolate* isolate, SnapshotByteSink* sink)
: isolate_(isolate),
sink_(sink),
@@ -1863,12 +1851,4 @@ void Serializer::Pad() {
}
-bool SnapshotByteSource::AtEOF() {
- if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false;
- for (int x = position_; x < length_; x++) {
- if (data_[x] != SerializerDeserializer::nop()) return false;
- }
- return true;
-}
-
} } // namespace v8::internal

Powered by Google App Engine
This is Rietveld 408576698