< prev index next >
src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp
Print this page
@@ -170,10 +170,27 @@
JVMFlag::Error apply_double(double value, bool verbose) {
return _constraint(value, verbose);
}
};
+class JVMFlagConstraint_ccstrlist : public JVMFlagConstraint {
+ JVMFlagConstraintFunc_ccstrlist _constraint;
+
+public:
+ JVMFlagConstraint_ccstrlist(const JVMFlag* flag,
+ JVMFlagConstraintFunc_ccstrlist func,
+ ConstraintType type) : JVMFlagConstraint(flag, type), _constraint(func) {}
+
+ JVMFlag::Error apply(bool verbose) {
+ return _constraint(_flag->get_ccstr(), verbose);
+ }
+
+ JVMFlag::Error apply_ccstrlist(ccstrlist value, bool verbose) {
+ return _constraint(value, verbose);
+ }
+};
+
// No constraint emitting
void emit_constraint_no(...) { /* NOP */ }
// No constraint emitting if function argument is NOT provided
void emit_constraint_bool(const JVMFlag* /*flag*/) { /* NOP */ }
@@ -210,10 +227,13 @@
JVMFlagConstraintList::add(new JVMFlagConstraint_size_t(flag, func, type));
}
void emit_constraint_double(const JVMFlag* flag, JVMFlagConstraintFunc_double func, JVMFlagConstraint::ConstraintType type) {
JVMFlagConstraintList::add(new JVMFlagConstraint_double(flag, func, type));
}
+void emit_constraint_ccstrlist(const JVMFlag* flag, JVMFlagConstraintFunc_ccstrlist func, JVMFlagConstraint::ConstraintType type) {
+ JVMFlagConstraintList::add(new JVMFlagConstraint_ccstrlist(flag, func, type));
+}
// Generate code to call emit_constraint_xxx function
#define EMIT_CONSTRAINT_START (void)(0
#define EMIT_CONSTRAINT(type, name) ); emit_constraint_##type(JVMFlagEx::flag_from_enum(FLAG_MEMBER_ENUM(name))
#define EMIT_CONSTRAINT_NO ); emit_constraint_no(0
< prev index next >