Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Unified Diff: runtime/bin/main.cc

Issue 14247005: Add flag --check-function-fingerprints, it checks all function fingerprints of the intrinsifier and… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/include/dart_api.h » ('j') | runtime/vm/object.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | runtime/include/dart_api.h » ('j') | runtime/vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698