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

Side by Side Diff: src/mksnapshot.cc

Issue 564035: Remove lazy loading of natives files and the natives cache.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: Created 10 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/mirror-delay.js ('k') | src/natives.h » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 virtual ~CppByteSink() { 113 virtual ~CppByteSink() {
114 if (fp_ != NULL) { 114 if (fp_ != NULL) {
115 fprintf(fp_, "};\n\n"); 115 fprintf(fp_, "};\n\n");
116 fprintf(fp_, "int Snapshot::size_ = %d;\n\n", bytes_written_); 116 fprintf(fp_, "int Snapshot::size_ = %d;\n\n", bytes_written_);
117 fprintf(fp_, "} } // namespace v8::internal\n"); 117 fprintf(fp_, "} } // namespace v8::internal\n");
118 fclose(fp_); 118 fclose(fp_);
119 } 119 }
120 } 120 }
121 121
122 virtual void Put(int byte, const char* description) { 122 virtual void Put(int byte, const char* description) {
123 i::SerializerDeserializer::Trace("Put %s: %d\n", description, byte);
123 if (bytes_written_ != 0) { 124 if (bytes_written_ != 0) {
124 fprintf(fp_, ","); 125 fprintf(fp_, ",");
125 } 126 }
126 fprintf(fp_, "%d", byte); 127 fprintf(fp_, "%d", byte);
127 bytes_written_++; 128 bytes_written_++;
128 if ((bytes_written_ & 0x3f) == 0) { 129 if ((bytes_written_ & 0x3f) == 0) {
129 fprintf(fp_, "\n"); 130 fprintf(fp_, "\n");
130 } 131 }
131 } 132 }
132 133
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 165 }
165 context.Dispose(); 166 context.Dispose();
166 CppByteSink sink(argv[1]); 167 CppByteSink sink(argv[1]);
167 // This results in a somewhat smaller snapshot, probably because it gets rid 168 // This results in a somewhat smaller snapshot, probably because it gets rid
168 // of some things that are cached between garbage collections. 169 // of some things that are cached between garbage collections.
169 i::Heap::CollectAllGarbage(true); 170 i::Heap::CollectAllGarbage(true);
170 i::StartupSerializer ser(&sink); 171 i::StartupSerializer ser(&sink);
171 ser.Serialize(); 172 ser.Serialize();
172 return 0; 173 return 0;
173 } 174 }
OLDNEW
« no previous file with comments | « src/mirror-delay.js ('k') | src/natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698