| 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 fprintf(stderr, "%s at line %d\n", *message_string, message->GetLineNumber()); | 263 fprintf(stderr, "%s at line %d\n", *message_string, message->GetLineNumber()); |
| 264 fprintf(stderr, "%s\n", *message_line); | 264 fprintf(stderr, "%s\n", *message_line); |
| 265 for (int i = 0; i <= message->GetEndColumn(); ++i) { | 265 for (int i = 0; i <= message->GetEndColumn(); ++i) { |
| 266 fprintf(stderr, "%c", i < message->GetStartColumn() ? ' ' : '^'); | 266 fprintf(stderr, "%c", i < message->GetStartColumn() ? ' ' : '^'); |
| 267 } | 267 } |
| 268 fprintf(stderr, "\n"); | 268 fprintf(stderr, "\n"); |
| 269 } | 269 } |
| 270 | 270 |
| 271 | 271 |
| 272 int main(int argc, char** argv) { | 272 int main(int argc, char** argv) { |
| 273 V8::PerformPerThreadSetup(); |
| 273 V8::InitializeICU(); | 274 V8::InitializeICU(); |
| 274 i::Isolate::SetCrashIfDefaultIsolateInitialized(); | 275 i::Isolate::SetCrashIfDefaultIsolateInitialized(); |
| 275 i::CpuFeatures::Probe(true); | 276 i::CpuFeatures::Probe(true); |
| 276 | 277 |
| 277 // By default, log code create information in the snapshot. | 278 // By default, log code create information in the snapshot. |
| 278 i::FLAG_log_code = true; | 279 i::FLAG_log_code = true; |
| 279 | 280 |
| 280 // Print the usage if an error occurs when parsing the command line | 281 // Print the usage if an error occurs when parsing the command line |
| 281 // flags or if the help flag is set. | 282 // flags or if the help flag is set. |
| 282 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true); | 283 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 writer.SetCompressor(&bzip2); | 390 writer.SetCompressor(&bzip2); |
| 390 #endif | 391 #endif |
| 391 writer.WriteSnapshot(snapshot_data, ser, context_data, context_ser); | 392 writer.WriteSnapshot(snapshot_data, ser, context_data, context_ser); |
| 392 } | 393 } |
| 393 } | 394 } |
| 394 | 395 |
| 395 isolate->Dispose(); | 396 isolate->Dispose(); |
| 396 V8::Dispose(); | 397 V8::Dispose(); |
| 397 return 0; | 398 return 0; |
| 398 } | 399 } |
| OLD | NEW |