| Index: runtime/bin/main.cc
|
| diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
|
| index 5b90c03f2994f898263fdf56b4e865987a2f4fb4..28804f4a1b6deccf32c39e52e95fbbe3a5cd4882 100644
|
| --- a/runtime/bin/main.cc
|
| +++ b/runtime/bin/main.cc
|
| @@ -65,16 +65,6 @@ static bool use_dart_frontend = false;
|
|
|
| static const char* frontend_filename = NULL;
|
|
|
| -// Value of the --save-feedback flag.
|
| -// (This pointer points into an argv buffer and does not need to be
|
| -// free'd.)
|
| -static const char* save_feedback_filename = NULL;
|
| -
|
| -// Value of the --load-feedback flag.
|
| -// (This pointer points into an argv buffer and does not need to be
|
| -// free'd.)
|
| -static const char* load_feedback_filename = NULL;
|
| -
|
| // Value of the --package-root flag.
|
| // (This pointer points into an argv buffer and does not need to be
|
| // free'd.)
|
| @@ -231,28 +221,6 @@ static bool ProcessPackagesOption(const char* arg,
|
| }
|
|
|
|
|
| -static bool ProcessSaveFeedbackOption(const char* arg,
|
| - CommandLineOptions* vm_options) {
|
| - ASSERT(arg != NULL);
|
| - if (*arg == '-') {
|
| - return false;
|
| - }
|
| - save_feedback_filename = arg;
|
| - return true;
|
| -}
|
| -
|
| -
|
| -static bool ProcessLoadFeedbackOption(const char* arg,
|
| - CommandLineOptions* vm_options) {
|
| - ASSERT(arg != NULL);
|
| - if (*arg == '-') {
|
| - return false;
|
| - }
|
| - load_feedback_filename = arg;
|
| - return true;
|
| -}
|
| -
|
| -
|
| static void* GetHashmapKeyFromString(char* key) {
|
| return reinterpret_cast<void*>(key);
|
| }
|
| @@ -596,8 +564,6 @@ static struct {
|
| {"--snapshot=", ProcessSnapshotFilenameOption},
|
| {"--snapshot-kind=", ProcessSnapshotKindOption},
|
| {"--use-blobs", ProcessUseBlobsOption},
|
| - {"--save-feedback=", ProcessSaveFeedbackOption},
|
| - {"--load-feedback=", ProcessLoadFeedbackOption},
|
| {"--trace-loading", ProcessTraceLoadingOption},
|
| {"--hot-reload-test-mode", ProcessHotReloadTestModeOption},
|
| {"--hot-reload-rollback-test-mode", ProcessHotReloadRollbackTestModeOption},
|
| @@ -1531,7 +1497,7 @@ static void GeneratePrecompiledSnapshot() {
|
|
|
|
|
| #if defined(TARGET_ARCH_X64)
|
| -static void GenerateAppJITSnapshot() {
|
| +static void GeneratePrecompiledJITSnapshot() {
|
| uint8_t* vm_isolate_buffer = NULL;
|
| intptr_t vm_isolate_size = 0;
|
| uint8_t* isolate_buffer = NULL;
|
| @@ -1562,7 +1528,7 @@ static void GenerateAppSnapshot() {
|
| if (Dart_IsError(result)) {
|
| ErrorExit(kErrorExitCode, "%s\n", Dart_GetError(result));
|
| }
|
| - GenerateAppJITSnapshot();
|
| + GeneratePrecompiledJITSnapshot();
|
| #else
|
| // Create an application snapshot of the script.
|
| uint8_t* vm_isolate_buffer = NULL;
|
| @@ -1721,27 +1687,8 @@ bool RunMainIsolate(const char* script_name, CommandLineOptions* dart_options) {
|
| {NULL, NULL, NULL} // Must be terminated with NULL entries.
|
| };
|
|
|
| - uint8_t* feedback_buffer = NULL;
|
| - intptr_t feedback_length = 0;
|
| - if (load_feedback_filename != NULL) {
|
| - File* file = File::Open(load_feedback_filename, File::kRead);
|
| - if (file == NULL) {
|
| - ErrorExit(kErrorExitCode, "Failed to read JIT feedback.\n");
|
| - }
|
| - feedback_length = file->Length();
|
| - feedback_buffer = reinterpret_cast<uint8_t*>(malloc(feedback_length));
|
| - if (!file->ReadFully(feedback_buffer, feedback_length)) {
|
| - ErrorExit(kErrorExitCode, "Failed to read JIT feedback.\n");
|
| - }
|
| - file->Release();
|
| - }
|
| -
|
| const bool reset_fields = gen_snapshot_kind == kAppAOT;
|
| - result = Dart_Precompile(standalone_entry_points, reset_fields,
|
| - feedback_buffer, feedback_length);
|
| - if (feedback_buffer != NULL) {
|
| - free(feedback_buffer);
|
| - }
|
| + result = Dart_Precompile(standalone_entry_points, reset_fields);
|
| CHECK_RESULT(result);
|
| }
|
|
|
| @@ -1785,16 +1732,6 @@ bool RunMainIsolate(const char* script_name, CommandLineOptions* dart_options) {
|
| }
|
| }
|
| CHECK_RESULT(result);
|
| -
|
| - if (save_feedback_filename != NULL) {
|
| - uint8_t* buffer = NULL;
|
| - intptr_t size = 0;
|
| - result = Dart_SaveJITFeedback(&buffer, &size);
|
| - if (Dart_IsError(result)) {
|
| - ErrorExit(kErrorExitCode, "%s\n", Dart_GetError(result));
|
| - }
|
| - WriteSnapshotFile(save_feedback_filename, false, buffer, size);
|
| - }
|
| }
|
| }
|
|
|
|
|