206 CommandLineFlagConstraintList::add(new CommandLineFlagConstraint_double(name, func, type));
207 }
208
209 // Generate code to call emit_constraint_xxx function
210 #define EMIT_CONSTRAINT_PRODUCT_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
211 #define EMIT_CONSTRAINT_COMMERCIAL_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
212 #define EMIT_CONSTRAINT_DIAGNOSTIC_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
213 #define EMIT_CONSTRAINT_EXPERIMENTAL_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
214 #define EMIT_CONSTRAINT_MANAGEABLE_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
215 #define EMIT_CONSTRAINT_PRODUCT_RW_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
216 #define EMIT_CONSTRAINT_PD_PRODUCT_FLAG(type, name, doc) ); emit_constraint_##type(#name
217 #define EMIT_CONSTRAINT_DEVELOPER_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
218 #define EMIT_CONSTRAINT_PD_DEVELOPER_FLAG(type, name, doc) ); emit_constraint_##type(#name
219 #define EMIT_CONSTRAINT_NOTPRODUCT_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
220 #define EMIT_CONSTRAINT_LP64_PRODUCT_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
221
222 // Generate func argument to pass into emit_constraint_xxx functions
223 #define EMIT_CONSTRAINT_CHECK(func, type) , func, CommandLineFlagConstraint::type
224
225 // the "name" argument must be a string literal
226 #define INITIAL_CONSTRAINTS_SIZE 45
227 GrowableArray<CommandLineFlagConstraint*>* CommandLineFlagConstraintList::_constraints = NULL;
228 CommandLineFlagConstraint::ConstraintType CommandLineFlagConstraintList::_validating_type = CommandLineFlagConstraint::AtParse;
229
230 // Check the ranges of all flags that have them or print them out and exit if requested
231 void CommandLineFlagConstraintList::init(void) {
232 _constraints = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<CommandLineFlagConstraint*>(INITIAL_CONSTRAINTS_SIZE, true);
233
234 emit_constraint_no(NULL RUNTIME_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG,
235 EMIT_CONSTRAINT_PD_DEVELOPER_FLAG,
236 EMIT_CONSTRAINT_PRODUCT_FLAG,
237 EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
238 EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
239 EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
240 EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
241 EMIT_CONSTRAINT_MANAGEABLE_FLAG,
242 EMIT_CONSTRAINT_PRODUCT_RW_FLAG,
243 EMIT_CONSTRAINT_LP64_PRODUCT_FLAG,
244 IGNORE_RANGE,
245 EMIT_CONSTRAINT_CHECK));
246
|
206 CommandLineFlagConstraintList::add(new CommandLineFlagConstraint_double(name, func, type));
207 }
208
209 // Generate code to call emit_constraint_xxx function
210 #define EMIT_CONSTRAINT_PRODUCT_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
211 #define EMIT_CONSTRAINT_COMMERCIAL_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
212 #define EMIT_CONSTRAINT_DIAGNOSTIC_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
213 #define EMIT_CONSTRAINT_EXPERIMENTAL_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
214 #define EMIT_CONSTRAINT_MANAGEABLE_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
215 #define EMIT_CONSTRAINT_PRODUCT_RW_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
216 #define EMIT_CONSTRAINT_PD_PRODUCT_FLAG(type, name, doc) ); emit_constraint_##type(#name
217 #define EMIT_CONSTRAINT_DEVELOPER_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
218 #define EMIT_CONSTRAINT_PD_DEVELOPER_FLAG(type, name, doc) ); emit_constraint_##type(#name
219 #define EMIT_CONSTRAINT_NOTPRODUCT_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
220 #define EMIT_CONSTRAINT_LP64_PRODUCT_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
221
222 // Generate func argument to pass into emit_constraint_xxx functions
223 #define EMIT_CONSTRAINT_CHECK(func, type) , func, CommandLineFlagConstraint::type
224
225 // the "name" argument must be a string literal
226 #define INITIAL_CONSTRAINTS_SIZE 69
227 GrowableArray<CommandLineFlagConstraint*>* CommandLineFlagConstraintList::_constraints = NULL;
228 CommandLineFlagConstraint::ConstraintType CommandLineFlagConstraintList::_validating_type = CommandLineFlagConstraint::AtParse;
229
230 // Check the ranges of all flags that have them or print them out and exit if requested
231 void CommandLineFlagConstraintList::init(void) {
232 _constraints = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<CommandLineFlagConstraint*>(INITIAL_CONSTRAINTS_SIZE, true);
233
234 emit_constraint_no(NULL RUNTIME_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG,
235 EMIT_CONSTRAINT_PD_DEVELOPER_FLAG,
236 EMIT_CONSTRAINT_PRODUCT_FLAG,
237 EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
238 EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
239 EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
240 EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
241 EMIT_CONSTRAINT_MANAGEABLE_FLAG,
242 EMIT_CONSTRAINT_PRODUCT_RW_FLAG,
243 EMIT_CONSTRAINT_LP64_PRODUCT_FLAG,
244 IGNORE_RANGE,
245 EMIT_CONSTRAINT_CHECK));
246
|