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

Side by Side Diff: runtime/vm/flags.h

Issue 1714743002: VM: Separate precompilation-specific code, make flags const. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
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 #ifndef VM_FLAGS_H_ 5 #ifndef VM_FLAGS_H_
6 #define VM_FLAGS_H_ 6 #define VM_FLAGS_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/flag_list.h" 9 #include "vm/flag_list.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 #define RELEASE_FLAG_MARCO(name, product_value, type, default_value, comment) \ 114 #define RELEASE_FLAG_MARCO(name, product_value, type, default_value, comment) \
115 const type FLAG_##name = product_value; 115 const type FLAG_##name = product_value;
116 116
117 #else // defined(PRODUCT) 117 #else // defined(PRODUCT)
118 118
119 #define RELEASE_FLAG_MARCO(name, product_value, type, default_value, comment) \ 119 #define RELEASE_FLAG_MARCO(name, product_value, type, default_value, comment) \
120 extern type FLAG_##name; 120 extern type FLAG_##name;
121 121
122 #endif // defined(PRODUCT) 122 #endif // defined(PRODUCT)
123 123
124 #if defined(DART_PRECOMPILED_RUNTIME)
Ivan Posva 2016/02/19 01:07:49 As discussed we need to have a way for a flag to b
Florian Schneider 2016/02/19 17:42:29 Done.
125 #define PRECOMPILE_FLAG_MARCO(name, pre_value, type, default_value, comment) \
126 const type FLAG_##name = pre_value;
127
128 #else // defined(DART_PRECOMPILED_RUNTIME)
129 #define PRECOMPILE_FLAG_MARCO(name, pre_value, type, default_value, comment) \
130 extern type FLAG_##name;
131
132 #endif // defined(DART_PRECOMPILED_RUNTIME)
133
124 // Now declare all flags here. 134 // Now declare all flags here.
125 FLAG_LIST(PRODUCT_FLAG_MARCO, RELEASE_FLAG_MARCO, DEBUG_FLAG_MARCO) 135 FLAG_LIST(PRODUCT_FLAG_MARCO,
136 RELEASE_FLAG_MARCO,
137 DEBUG_FLAG_MARCO,
138 PRECOMPILE_FLAG_MARCO)
126 139
127 #undef RELEASE_FLAG_MARCO 140 #undef RELEASE_FLAG_MARCO
128 #undef DEBUG_FLAG_MARCO 141 #undef DEBUG_FLAG_MARCO
129 #undef PRODUCT_FLAG_MARCO 142 #undef PRODUCT_FLAG_MARCO
143 #undef PRECOMPILE_FLAG_MARCO
130 144
131 } // namespace dart 145 } // namespace dart
132 146
133 #endif // VM_FLAGS_H_ 147 #endif // VM_FLAGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698