| Index: runtime/bin/main.cc
|
| ===================================================================
|
| --- runtime/bin/main.cc (revision 21695)
|
| +++ runtime/bin/main.cc (working copy)
|
| @@ -60,8 +60,10 @@
|
| // Global flag that is used to indicate that we want to compile all the
|
| // dart functions and not run anything.
|
| static bool has_compile_all = false;
|
| +// Global flag that is used to indicate that we want to check function
|
| +// fingerprints.
|
| +static bool has_check_function_fingerprints = false;
|
|
|
| -
|
| // Global flag that is used to indicate that we want to print the source code
|
| // for script that is being run.
|
| static bool has_print_script = false;
|
| @@ -130,6 +132,16 @@
|
| }
|
|
|
|
|
| +static bool ProcessFingerprintedFunctions(const char* arg) {
|
| + ASSERT(arg != NULL);
|
| + if (*arg != '\0') {
|
| + return false;
|
| + }
|
| + has_check_function_fingerprints = true;
|
| + return true;
|
| +}
|
| +
|
| +
|
| static bool ProcessDebugOption(const char* port) {
|
| // TODO(hausner): Add support for specifying an IP address on which
|
| // the debugger should listen.
|
| @@ -228,6 +240,7 @@
|
| { "--stats-root=", ProcessVmStatsRootOption },
|
| { "--stats", ProcessVmStatsOption },
|
| { "--print-script", ProcessPrintScriptOption },
|
| + { "--check-function-fingerprints", ProcessFingerprintedFunctions },
|
| { NULL, NULL }
|
| };
|
|
|
| @@ -786,6 +799,13 @@
|
| }
|
| }
|
|
|
| + if (has_check_function_fingerprints) {
|
| + result = Dart_CheckFunctionFingerprints();
|
| + if (Dart_IsError(result)) {
|
| + return ErrorExit("%s\n", Dart_GetError(result));
|
| + }
|
| + }
|
| +
|
| // Create a dart options object that can be accessed from dart code.
|
| Dart_Handle options_result =
|
| SetupRuntimeOptions(&dart_options, executable_name, script_name);
|
|
|