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

Unified Diff: src/mksnapshot.cc

Issue 7066048: Compress sources of JS libraries in addition to the snapshot. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments addressed Created 9 years, 6 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
« src/bz2-decompress.h ('K') | « src/d8.cc ('k') | src/natives.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mksnapshot.cc
diff --git a/src/mksnapshot.cc b/src/mksnapshot.cc
index dd491166bd470b65eee30c8c8d562dffd9f8642f..4669086bfd08d6558f9b7572d7fcb4d8de24eb3b 100644
--- a/src/mksnapshot.cc
+++ b/src/mksnapshot.cc
@@ -35,6 +35,7 @@
#include "v8.h"
#include "bootstrapper.h"
+#include "bz2-decompress.h"
#include "natives.h"
#include "platform.h"
#include "serialize.h"
@@ -136,6 +137,7 @@ class PartialSnapshotSink : public i::SnapshotByteSink {
return true;
}
int raw_size() { return raw_size_; }
+
private:
i::List<char> data_;
int raw_size_;
@@ -281,6 +283,14 @@ int main(int argc, char** argv) {
i::FlagList::PrintHelp();
return !i::FLAG_help;
}
+#ifdef COMPRESS_STARTUP_DATA_BZ2
+ BZip2Decompressor natives_decompressor;
+ int bz2_result = natives_decompressor.DecompressStartupData();
+ if (bz2_result != BZ_OK) {
+ fprintf(stderr, "bzip error code: %d\n", bz2_result);
+ exit(1);
+ }
+#endif
i::Serializer::Enable();
Persistent<Context> context = v8::Context::New();
ASSERT(!context.IsEmpty());
« src/bz2-decompress.h ('K') | « src/d8.cc ('k') | src/natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698