Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit af45552

Browse files
rmacnak-googlecommit-bot@chromium.org
authored andcommitted
[gen_snapshot] Remove --print_dependencies and --dependencies_only.
These options only make sense with a source input, which is not supported in Dart 2. Change-Id: I7fcfecf44c310f49a688f189e77e8768cd82db23 Reviewed-on: https://dart-review.googlesource.com/65794 Reviewed-by: Zach Anderson <zra@google.com> Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
1 parent 34f17b2 commit af45552

File tree

1 file changed

+20
-50
lines changed

1 file changed

+20
-50
lines changed

runtime/bin/gen_snapshot.cc

Lines changed: 20 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,6 @@ static const char* kSnapshotKindNames[] = {
154154
V(save_obfuscation_map, obfuscation_map_filename)
155155

156156
#define BOOL_OPTIONS_LIST(V) \
157-
V(dependencies_only, dependencies_only) \
158-
V(print_dependencies, print_dependencies) \
159157
V(obfuscate, obfuscate) \
160158
V(verbose, verbose) \
161159
V(version, version) \
@@ -206,10 +204,6 @@ static void PrintUsage() {
206204
"--dependencies=<output-file> \n"
207205
" Generates a Makefile with snapshot output files as targets and all \n"
208206
" transitive imports as sources. \n"
209-
"--print_dependencies \n"
210-
" Prints all transitive imports to stdout. \n"
211-
"--dependencies_only \n"
212-
" Don't create and output the snapshot. \n"
213207
"--help \n"
214208
" Display this message (add --verbose for information about all VM options).\n"
215209
"--version \n"
@@ -705,33 +699,12 @@ static void CreateAndWriteDependenciesFile() {
705699

706700
Loader::ResolveDependenciesAsFilePaths();
707701

708-
ASSERT((dependencies_filename != NULL) || print_dependencies);
702+
ASSERT(dependencies_filename != NULL);
709703
if (dependencies_filename != NULL) {
710704
DependenciesFileWriter writer;
711705
writer.WriteDependencies(dependencies);
712706
}
713707

714-
if (print_dependencies) {
715-
Log::Print("%s\n", vm_snapshot_data_filename);
716-
if (snapshot_kind == kScript) {
717-
if (vm_snapshot_data_filename != NULL) {
718-
Log::Print("%s\n", vm_snapshot_data_filename);
719-
}
720-
if (vm_snapshot_instructions_filename != NULL) {
721-
Log::Print("%s\n", vm_snapshot_instructions_filename);
722-
}
723-
if (isolate_snapshot_data_filename != NULL) {
724-
Log::Print("%s\n", isolate_snapshot_data_filename);
725-
}
726-
if (isolate_snapshot_instructions_filename != NULL) {
727-
Log::Print("%s\n", isolate_snapshot_instructions_filename);
728-
}
729-
}
730-
for (intptr_t i = 0; i < dependencies->length(); i++) {
731-
Log::Print("%s\n", dependencies->At(i));
732-
}
733-
}
734-
735708
for (intptr_t i = 0; i < dependencies->length(); i++) {
736709
free(dependencies->At(i));
737710
}
@@ -1422,7 +1395,7 @@ static int GenerateSnapshotFromKernel(const uint8_t* kernel_buffer,
14221395
char* error = NULL;
14231396
IsolateData* isolate_data = new IsolateData(NULL, commandline_package_root,
14241397
commandline_packages_file, NULL);
1425-
if ((dependencies_filename != NULL) || print_dependencies) {
1398+
if (dependencies_filename != NULL) {
14261399
isolate_data->set_dependencies(new MallocGrowableArray<char*>());
14271400
}
14281401

@@ -1552,8 +1525,7 @@ int main(int argc, char** argv) {
15521525
"Can only generate core or aot snapshots from a kernel file.\n");
15531526
return kErrorExitCode;
15541527
}
1555-
if ((dependencies_filename != NULL) || print_dependencies ||
1556-
dependencies_only) {
1528+
if (dependencies_filename != NULL) {
15571529
Log::PrintErr("Depfiles are not supported in Dart 2.\n");
15581530
return kErrorExitCode;
15591531
}
@@ -1718,7 +1690,7 @@ int main(int argc, char** argv) {
17181690
// be in the snapshot.
17191691
isolate_data = new IsolateData(app_script_name, commandline_package_root,
17201692
commandline_packages_file, NULL);
1721-
if ((dependencies_filename != NULL) || print_dependencies) {
1693+
if (dependencies_filename != NULL) {
17221694
isolate_data->set_dependencies(new MallocGrowableArray<char*>());
17231695
}
17241696

@@ -1768,24 +1740,22 @@ int main(int argc, char** argv) {
17681740

17691741
LoadCompilationTrace();
17701742

1771-
if (!dependencies_only) {
1772-
switch (snapshot_kind) {
1773-
case kCore:
1774-
CreateAndWriteCoreSnapshot();
1775-
break;
1776-
case kCoreJIT:
1777-
CreateAndWriteCoreJITSnapshot();
1778-
break;
1779-
case kScript:
1780-
CreateAndWriteScriptSnapshot();
1781-
break;
1782-
case kAppAOTBlobs:
1783-
case kAppAOTAssembly:
1784-
CreateAndWritePrecompiledSnapshot(entry_points);
1785-
break;
1786-
default:
1787-
UNREACHABLE();
1788-
}
1743+
switch (snapshot_kind) {
1744+
case kCore:
1745+
CreateAndWriteCoreSnapshot();
1746+
break;
1747+
case kCoreJIT:
1748+
CreateAndWriteCoreJITSnapshot();
1749+
break;
1750+
case kScript:
1751+
CreateAndWriteScriptSnapshot();
1752+
break;
1753+
case kAppAOTBlobs:
1754+
case kAppAOTAssembly:
1755+
CreateAndWritePrecompiledSnapshot(entry_points);
1756+
break;
1757+
default:
1758+
UNREACHABLE();
17891759
}
17901760

17911761
CreateAndWriteDependenciesFile();

0 commit comments

Comments
 (0)