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

Side by Side Diff: src/mksnapshot.cc

Issue 258993002: Simplified CPU/CpuFeatures a bit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 294 }
295 295
296 296
297 int main(int argc, char** argv) { 297 int main(int argc, char** argv) {
298 V8::InitializeICU(); 298 V8::InitializeICU();
299 i::Isolate::SetCrashIfDefaultIsolateInitialized(); 299 i::Isolate::SetCrashIfDefaultIsolateInitialized();
300 300
301 // By default, log code create information in the snapshot. 301 // By default, log code create information in the snapshot.
302 i::FLAG_log_code = true; 302 i::FLAG_log_code = true;
303 303
304 #if V8_TARGET_ARCH_ARM
305 // Printing flags on ARM requires knowing if we intend to enable
306 // the serializer or not.
307 v8::internal::CpuFeatures::SetHintCreatingSnapshot();
308 #endif
309
310 // Print the usage if an error occurs when parsing the command line 304 // Print the usage if an error occurs when parsing the command line
311 // flags or if the help flag is set. 305 // flags or if the help flag is set.
312 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true); 306 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true, true);
313 if (result > 0 || argc != 2 || i::FLAG_help) { 307 if (result > 0 || argc != 2 || i::FLAG_help) {
314 ::printf("Usage: %s [flag] ... outfile\n", argv[0]); 308 ::printf("Usage: %s [flag] ... outfile\n", argv[0]);
315 i::FlagList::PrintHelp(); 309 i::FlagList::PrintHelp();
316 return !i::FLAG_help; 310 return !i::FLAG_help;
317 } 311 }
318 #ifdef COMPRESS_STARTUP_DATA_BZ2 312 #ifdef COMPRESS_STARTUP_DATA_BZ2
319 BZip2Decompressor natives_decompressor; 313 BZip2Decompressor natives_decompressor;
320 int bz2_result = natives_decompressor.Decompress(); 314 int bz2_result = natives_decompressor.Decompress();
321 if (bz2_result != BZ_OK) { 315 if (bz2_result != BZ_OK) {
322 fprintf(stderr, "bzip error code: %d\n", bz2_result); 316 fprintf(stderr, "bzip error code: %d\n", bz2_result);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 writer.SetCompressor(&bzip2); 412 writer.SetCompressor(&bzip2);
419 #endif 413 #endif
420 writer.WriteSnapshot(snapshot_data, ser, context_data, context_ser); 414 writer.WriteSnapshot(snapshot_data, ser, context_data, context_ser);
421 } 415 }
422 416
423 isolate->Exit(); 417 isolate->Exit();
424 isolate->Dispose(); 418 isolate->Dispose();
425 V8::Dispose(); 419 V8::Dispose();
426 return 0; 420 return 0;
427 } 421 }
OLDNEW
« src/arm/assembler-arm.cc ('K') | « src/mips/cpu-mips.cc ('k') | src/v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698