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

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: gen js + code review 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
« no previous file with comments | « runtime/bin/vmservice/client/lib/src/service/object.dart ('k') | runtime/vm/flags.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flags.h
diff --git a/runtime/vm/flags.h b/runtime/vm/flags.h
index b4bee00ff71298a99fdbe7a894ca776f4ad491ca..2fbec8fd30127b423c3aa8d4fc7a6f3601bf9a03 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:
@@ -68,17 +70,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();
« no previous file with comments | « runtime/bin/vmservice/client/lib/src/service/object.dart ('k') | runtime/vm/flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698