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

Unified Diff: runtime/vm/flags.h

Issue 299143007: Show flags in Observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: tweaks Created 6 years, 7 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
Index: runtime/vm/flags.h
diff --git a/runtime/vm/flags.h b/runtime/vm/flags.h
index f9d88f0ba6904bdc78c1ac1ef79b186721998ae0..0f29506440631aceb012d590cdbda5e4285ed7e4 100644
--- a/runtime/vm/flags.h
+++ b/runtime/vm/flags.h
@@ -36,8 +36,10 @@ namespace dart {
typedef void (*FlagHandler)(bool value);
-// Forward declaration.
+// Forward declarations.
class Flag;
+class JSONArray;
+class JSONStream;
class Flags {
public:
@@ -66,17 +68,31 @@ class Flags {
static bool Initialized() { return initialized_; }
+ static void PrintJSON(JSONStream* js);
+
+ static bool SetFlag(const char* name,
+ const char* value,
+ const char** error);
+
private:
- static Flag* flags_;
+ static Flag** flags_;
+ static intptr_t capacity_;
+ static intptr_t num_flags_;
static bool initialized_;
+ static void AddFlag(Flag* flag);
+
+ static bool SetFlagFromString(Flag* flag, const char* argument);
+
static void Parse(const char* option);
static int CompareFlagNames(const void* left, const void* right);
static void PrintFlags();
+ static void PrintFlagToJSONArray(JSONArray* jsarr, const Flag* flag);
+
// Testing needs direct access to private methods.
friend void Dart_TestParseFlags();

Powered by Google App Engine
This is Rietveld 408576698