OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <errno.h> | 5 #include <errno.h> |
6 #include <stdio.h> | 6 #include <stdio.h> |
7 #ifdef COMPRESS_STARTUP_DATA_BZ2 | 7 #ifdef COMPRESS_STARTUP_DATA_BZ2 |
8 #include <bzlib.h> | 8 #include <bzlib.h> |
9 #endif | 9 #endif |
10 #include <signal.h> | 10 #include <signal.h> |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 fprintf(stderr, "%s\n", *message_line); | 310 fprintf(stderr, "%s\n", *message_line); |
311 for (int i = 0; i <= message->GetEndColumn(); ++i) { | 311 for (int i = 0; i <= message->GetEndColumn(); ++i) { |
312 fprintf(stderr, "%c", i < message->GetStartColumn() ? ' ' : '^'); | 312 fprintf(stderr, "%c", i < message->GetStartColumn() ? ' ' : '^'); |
313 } | 313 } |
314 fprintf(stderr, "\n"); | 314 fprintf(stderr, "\n"); |
315 } | 315 } |
316 | 316 |
317 | 317 |
318 int main(int argc, char** argv) { | 318 int main(int argc, char** argv) { |
319 V8::InitializeICU(); | 319 V8::InitializeICU(); |
| 320 i::Isolate::SetCrashIfDefaultIsolateInitialized(); |
320 i::CpuFeatures::Probe(true); | 321 i::CpuFeatures::Probe(true); |
321 | 322 |
322 // By default, log code create information in the snapshot. | 323 // By default, log code create information in the snapshot. |
323 i::FLAG_log_code = true; | 324 i::FLAG_log_code = true; |
324 | 325 |
325 // Print the usage if an error occurs when parsing the command line | 326 // Print the usage if an error occurs when parsing the command line |
326 // flags or if the help flag is set. | 327 // flags or if the help flag is set. |
327 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true); | 328 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true); |
328 if (result > 0 || argc != 2 || i::FLAG_help) { | 329 if (result > 0 || argc != 2 || i::FLAG_help) { |
329 ::printf("Usage: %s [flag] ... outfile\n", argv[0]); | 330 ::printf("Usage: %s [flag] ... outfile\n", argv[0]); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 writer.SetCompressor(&bzip2); | 436 writer.SetCompressor(&bzip2); |
436 #endif | 437 #endif |
437 writer.WriteSnapshot(snapshot_data, ser, context_data, context_ser); | 438 writer.WriteSnapshot(snapshot_data, ser, context_data, context_ser); |
438 } | 439 } |
439 } | 440 } |
440 | 441 |
441 isolate->Dispose(); | 442 isolate->Dispose(); |
442 V8::Dispose(); | 443 V8::Dispose(); |
443 return 0; | 444 return 0; |
444 } | 445 } |
OLD | NEW |