@@ -81,7 +81,6 @@ enum SnapshotKind {
8181 kCoreJIT ,
8282 kApp ,
8383 kAppJIT ,
84- kAppAOTBlobs ,
8584 kAppAOTAssembly ,
8685 kAppAOTElf ,
8786 kVMAOTAssembly ,
@@ -95,7 +94,6 @@ static const char* kSnapshotKindNames[] = {
9594 " core-jit" ,
9695 " app" ,
9796 " app-jit" ,
98- " app-aot-blobs" ,
9997 " app-aot-assembly" ,
10098 " app-aot-elf" ,
10199 " vm-aot-assembly" ,
@@ -146,8 +144,7 @@ DEFINE_ENUM_OPTION(snapshot_kind, SnapshotKind, snapshot_kind);
146144DEFINE_CB_OPTION (ProcessEnvironmentOption);
147145
148146static bool IsSnapshottingForPrecompilation () {
149- return (snapshot_kind == kAppAOTBlobs ) ||
150- (snapshot_kind == kAppAOTAssembly ) || (snapshot_kind == kAppAOTElf ) ||
147+ return (snapshot_kind == kAppAOTAssembly ) || (snapshot_kind == kAppAOTElf ) ||
151148 (snapshot_kind == kVMAOTAssembly );
152149}
153150
@@ -286,34 +283,6 @@ static int ParseArguments(int argc,
286283 }
287284 break ;
288285 }
289- case kAppAOTBlobs : {
290- if ((blobs_container_filename == NULL ) &&
291- ((vm_snapshot_data_filename == NULL ) ||
292- (vm_snapshot_instructions_filename == NULL ) ||
293- (isolate_snapshot_data_filename == NULL ) ||
294- (isolate_snapshot_instructions_filename == NULL ))) {
295- Syslog::PrintErr (
296- " Building an AOT snapshot as blobs requires specifying output "
297- " file for --blobs_container_filename or "
298- " files for --vm_snapshot_data, --vm_snapshot_instructions, "
299- " --isolate_snapshot_data and --isolate_snapshot_instructions.\n\n " );
300- return -1 ;
301- }
302- if ((blobs_container_filename != NULL ) &&
303- ((vm_snapshot_data_filename != NULL ) ||
304- (vm_snapshot_instructions_filename != NULL ) ||
305- (isolate_snapshot_data_filename != NULL ) ||
306- (isolate_snapshot_instructions_filename != NULL ))) {
307- Syslog::PrintErr (
308- " Building an AOT snapshot as blobs requires specifying output "
309- " file for --blobs_container_filename or "
310- " files for --vm_snapshot_data, --vm_snapshot_instructions, "
311- " --isolate_snapshot_data and --isolate_snapshot_instructions"
312- " not both.\n\n " );
313- return -1 ;
314- }
315- break ;
316- }
317286 case kAppAOTElf : {
318287 if (elf_filename == NULL ) {
319288 Syslog::PrintErr (
@@ -669,54 +638,6 @@ static void CreateAndWritePrecompiledSnapshot() {
669638 " To avoid this, use --strip to remove it and "
670639 " --save-debugging-info=<...> to save it to a separate file.\n " );
671640 }
672- } else if (snapshot_kind == kAppAOTBlobs ) {
673- Syslog::PrintErr (
674- " WARNING: app-aot-blobs snapshots have been deprecated and support for "
675- " generating them will be removed soon. Please use the app-aot-elf or "
676- " app-aot-assembly snapshot kinds in conjunction with the portable ELF "
677- " loader from //runtime/bin:elf_loader if necessary. See "
678- " http://dartbug.com/38764 for more details.\n " );
679-
680- uint8_t * vm_snapshot_data_buffer = NULL ;
681- intptr_t vm_snapshot_data_size = 0 ;
682- uint8_t * vm_snapshot_instructions_buffer = NULL ;
683- intptr_t vm_snapshot_instructions_size = 0 ;
684- uint8_t * isolate_snapshot_data_buffer = NULL ;
685- intptr_t isolate_snapshot_data_size = 0 ;
686- uint8_t * isolate_snapshot_instructions_buffer = NULL ;
687- intptr_t isolate_snapshot_instructions_size = 0 ;
688- File* debug_file = nullptr ;
689- if (debugging_info_filename != nullptr ) {
690- debug_file = OpenFile (debugging_info_filename);
691- }
692- result = Dart_CreateAppAOTSnapshotAsBlobs (
693- &vm_snapshot_data_buffer, &vm_snapshot_data_size,
694- &vm_snapshot_instructions_buffer, &vm_snapshot_instructions_size,
695- &isolate_snapshot_data_buffer, &isolate_snapshot_data_size,
696- &isolate_snapshot_instructions_buffer,
697- &isolate_snapshot_instructions_size, StreamingWriteCallback,
698- debug_file);
699- if (debug_file != nullptr ) debug_file->Release ();
700- CHECK_RESULT (result);
701-
702- if (blobs_container_filename != NULL ) {
703- Snapshot::WriteAppSnapshot (
704- blobs_container_filename, vm_snapshot_data_buffer,
705- vm_snapshot_data_size, vm_snapshot_instructions_buffer,
706- vm_snapshot_instructions_size, isolate_snapshot_data_buffer,
707- isolate_snapshot_data_size, isolate_snapshot_instructions_buffer,
708- isolate_snapshot_instructions_size);
709- } else {
710- WriteFile (vm_snapshot_data_filename, vm_snapshot_data_buffer,
711- vm_snapshot_data_size);
712- WriteFile (vm_snapshot_instructions_filename,
713- vm_snapshot_instructions_buffer, vm_snapshot_instructions_size);
714- WriteFile (isolate_snapshot_data_filename, isolate_snapshot_data_buffer,
715- isolate_snapshot_data_size);
716- WriteFile (isolate_snapshot_instructions_filename,
717- isolate_snapshot_instructions_buffer,
718- isolate_snapshot_instructions_size);
719- }
720641 } else {
721642 UNREACHABLE ();
722643 }
@@ -826,7 +747,6 @@ static int CreateIsolateAndSnapshot(const CommandLineOptions& inputs) {
826747 CreateAndWriteAppJITSnapshot ();
827748 break ;
828749 case kAppAOTAssembly :
829- case kAppAOTBlobs :
830750 case kAppAOTElf :
831751 CreateAndWritePrecompiledSnapshot ();
832752 break ;
0 commit comments