| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/flags.h" | 5 #include "vm/flags.h" |
| 6 | 6 |
| 7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
| 8 #include "vm/json_stream.h" | 8 #include "vm/json_stream.h" |
| 9 #include "vm/os.h" | 9 #include "vm/os.h" |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 FLAG_LIST(PRODUCT_FLAG_MARCO, | 73 FLAG_LIST(PRODUCT_FLAG_MARCO, |
| 74 RELEASE_FLAG_MARCO, | 74 RELEASE_FLAG_MARCO, |
| 75 DEBUG_FLAG_MARCO, | 75 DEBUG_FLAG_MARCO, |
| 76 PRECOMPILE_FLAG_MARCO) | 76 PRECOMPILE_FLAG_MARCO) |
| 77 | 77 |
| 78 #undef RELEASE_FLAG_MARCO | 78 #undef RELEASE_FLAG_MARCO |
| 79 #undef DEBUG_FLAG_MARCO | 79 #undef DEBUG_FLAG_MARCO |
| 80 #undef PRODUCT_FLAG_MARCO | 80 #undef PRODUCT_FLAG_MARCO |
| 81 #undef PRECOMPILE_FLAG_MARCO | 81 #undef PRECOMPILE_FLAG_MARCO |
| 82 | 82 |
| 83 |
| 83 bool Flags::initialized_ = false; | 84 bool Flags::initialized_ = false; |
| 84 | 85 |
| 85 // List of registered flags. | 86 // List of registered flags. |
| 86 Flag** Flags::flags_ = NULL; | 87 Flag** Flags::flags_ = NULL; |
| 87 intptr_t Flags::capacity_ = 0; | 88 intptr_t Flags::capacity_ = 0; |
| 88 intptr_t Flags::num_flags_ = 0; | 89 intptr_t Flags::num_flags_ = 0; |
| 89 | 90 |
| 90 class Flag { | 91 class Flag { |
| 91 public: | 92 public: |
| 92 enum FlagType { | 93 enum FlagType { |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 } | 537 } |
| 537 JSONObject jsobj(js); | 538 JSONObject jsobj(js); |
| 538 jsobj.AddProperty("type", "FlagList"); | 539 jsobj.AddProperty("type", "FlagList"); |
| 539 JSONArray jsarr(&jsobj, "flags"); | 540 JSONArray jsarr(&jsobj, "flags"); |
| 540 for (intptr_t i = 0; i < num_flags_; ++i) { | 541 for (intptr_t i = 0; i < num_flags_; ++i) { |
| 541 PrintFlagToJSONArray(&jsarr, flags_[i]); | 542 PrintFlagToJSONArray(&jsarr, flags_[i]); |
| 542 } | 543 } |
| 543 } | 544 } |
| 544 | 545 |
| 545 } // namespace dart | 546 } // namespace dart |
| OLD | NEW |