OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // Generate a snapshot file after loading all the scripts specified on the | 5 // Generate a snapshot file after loading all the scripts specified on the |
6 // command line. | 6 // command line. |
7 | 7 |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <string.h> | 9 #include <string.h> |
10 #include <stdio.h> | 10 #include <stdio.h> |
11 | 11 |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 | 446 |
447 | 447 |
448 static void SetupForGenericSnapshotCreation() { | 448 static void SetupForGenericSnapshotCreation() { |
449 SetupForUriResolution(); | 449 SetupForUriResolution(); |
450 | 450 |
451 Dart_Handle library = | 451 Dart_Handle library = |
452 LoadGenericSnapshotCreationScript(Builtin::kJsonLibrary); | 452 LoadGenericSnapshotCreationScript(Builtin::kJsonLibrary); |
453 VerifyLoaded(library); | 453 VerifyLoaded(library); |
454 library = LoadGenericSnapshotCreationScript(Builtin::kCryptoLibrary); | 454 library = LoadGenericSnapshotCreationScript(Builtin::kCryptoLibrary); |
455 VerifyLoaded(library); | 455 VerifyLoaded(library); |
| 456 // TODO(regis): Reenable this code for arm and mips when possible. |
| 457 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) |
456 library = LoadGenericSnapshotCreationScript(Builtin::kIOLibrary); | 458 library = LoadGenericSnapshotCreationScript(Builtin::kIOLibrary); |
457 VerifyLoaded(library); | 459 VerifyLoaded(library); |
| 460 #endif |
458 } | 461 } |
459 | 462 |
460 | 463 |
461 int main(int argc, char** argv) { | 464 int main(int argc, char** argv) { |
462 CommandLineOptions vm_options(argc); | 465 CommandLineOptions vm_options(argc); |
463 | 466 |
464 // Initialize the URL mapping array. | 467 // Initialize the URL mapping array. |
465 CommandLineOptions url_mapping_array(argc); | 468 CommandLineOptions url_mapping_array(argc); |
466 url_mapping = &url_mapping_array; | 469 url_mapping = &url_mapping_array; |
467 | 470 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 CreateAndWriteSnapshot(true); | 598 CreateAndWriteSnapshot(true); |
596 | 599 |
597 free(snapshot_buffer); | 600 free(snapshot_buffer); |
598 } | 601 } |
599 } else { | 602 } else { |
600 SetupForGenericSnapshotCreation(); | 603 SetupForGenericSnapshotCreation(); |
601 CreateAndWriteSnapshot(false); | 604 CreateAndWriteSnapshot(false); |
602 } | 605 } |
603 return 0; | 606 return 0; |
604 } | 607 } |
OLD | NEW |