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

Unified Diff: vm/flags.h

Issue 9668034: Fix issue 1950: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 9 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 | vm/flags.cc » ('j') | vm/flags.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/flags.h
===================================================================
--- vm/flags.h (revision 5257)
+++ vm/flags.h (working copy)
@@ -19,7 +19,10 @@
default_value, \
comment)
+#define DEFINE_FLAG_HANDLER(handler, name, comment) \
+ bool DUMMY_##name = Flags::Register_func(handler, #name, comment)
+
#if defined(DEBUG)
#define DECLARE_DEBUG_FLAG(type, name) DECLARE_FLAG(type, name)
#define DEFINE_DEBUG_FLAG(type, name, default_value, comment) \
@@ -31,6 +34,8 @@
namespace dart {
+typedef void (*FlagHandler)(bool value);
+
// Forward declaration.
class Flag;
@@ -51,6 +56,10 @@
const char* default_value,
const char* comment);
+ static bool Register_func(FlagHandler handler,
+ const char* name,
+ const char* comment);
+
static bool ProcessCommandLineFlags(int argc, const char** argv);
static Flag* Lookup(const char* name);
« no previous file with comments | « no previous file | vm/flags.cc » ('j') | vm/flags.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698