|
30 | 30 | class outputStream;
|
31 | 31 | template <typename T> class JVMTypedFlagLimit;
|
32 | 32 |
|
33 |
| -enum class JVMFlagConstraintPhase : int { |
| 33 | +enum class JVMFlagConstraintPhase : char { |
34 | 34 | // Will be validated during argument processing (Arguments::parse_argument).
|
35 | 35 | AtParse = 0,
|
36 | 36 | // Will be validated inside Threads::create_vm(), right after Arguments::apply_ergo().
|
@@ -67,7 +67,7 @@ template <typename T> class JVMTypedFlagLimit;
|
67 | 67 |
|
68 | 68 | class JVMFlagLimit {
|
69 | 69 | short _constraint_func;
|
70 |
| - char _phase; |
| 70 | + JVMFlagConstraintPhase _phase; |
71 | 71 | char _kind;
|
72 | 72 |
|
73 | 73 | #ifdef ASSERT
|
@@ -100,10 +100,10 @@ class JVMFlagLimit {
|
100 | 100 |
|
101 | 101 | public:
|
102 | 102 | void* constraint_func() const;
|
103 |
| - char phase() const { return _phase; } |
| 103 | + JVMFlagConstraintPhase phase() const { return _phase; } |
104 | 104 | char kind() const { return _kind; }
|
105 | 105 |
|
106 |
| - constexpr JVMFlagLimit(int type_enum, short func, short phase, short kind) |
| 106 | + constexpr JVMFlagLimit(int type_enum, short func, JVMFlagConstraintPhase phase, char kind) |
107 | 107 | : _constraint_func(func), _phase(phase), _kind(kind) DEBUG_ONLY(COMMA _type_enum(type_enum)) {}
|
108 | 108 |
|
109 | 109 | static const JVMFlagLimit* get_range(const JVMFlag* flag) {
|
@@ -155,22 +155,22 @@ class JVMTypedFlagLimit : public JVMFlagLimit {
|
155 | 155 | // dummy - no range or constraint. This object will not be emitted into the .o file
|
156 | 156 | // because we declare it as "const" but has no reference to it.
|
157 | 157 | constexpr JVMTypedFlagLimit(int type_enum) :
|
158 |
| - JVMFlagLimit(0, 0, 0, 0), _min(0), _max(0) {} |
| 158 | + JVMFlagLimit(0, 0, JVMFlagConstraintPhase::AtParse, 0), _min(0), _max(0) {} |
159 | 159 |
|
160 | 160 | // range only
|
161 | 161 | constexpr JVMTypedFlagLimit(int type_enum, T min, T max) :
|
162 |
| - JVMFlagLimit(type_enum, 0, 0, HAS_RANGE), _min(min), _max(max) {} |
| 162 | + JVMFlagLimit(type_enum, 0, JVMFlagConstraintPhase::AtParse, HAS_RANGE), _min(min), _max(max) {} |
163 | 163 |
|
164 | 164 | // constraint only
|
165 |
| - constexpr JVMTypedFlagLimit(int type_enum, ConstraintMarker dummy2, short func, int phase) : |
| 165 | + constexpr JVMTypedFlagLimit(int type_enum, ConstraintMarker dummy2, short func, JVMFlagConstraintPhase phase) : |
166 | 166 | JVMFlagLimit(type_enum, func, phase, HAS_CONSTRAINT), _min(0), _max(0) {}
|
167 | 167 |
|
168 | 168 | // range and constraint
|
169 |
| - constexpr JVMTypedFlagLimit(int type_enum, T min, T max, ConstraintMarker dummy2, short func, int phase) : |
| 169 | + constexpr JVMTypedFlagLimit(int type_enum, T min, T max, ConstraintMarker dummy2, short func, JVMFlagConstraintPhase phase) : |
170 | 170 | JVMFlagLimit(type_enum, func, phase, HAS_RANGE | HAS_CONSTRAINT), _min(min), _max(max) {}
|
171 | 171 |
|
172 | 172 | // constraint and range
|
173 |
| - constexpr JVMTypedFlagLimit(int type_enum, ConstraintMarker dummy2, short func, int phase, T min, T max) : |
| 173 | + constexpr JVMTypedFlagLimit(int type_enum, ConstraintMarker dummy2, short func, JVMFlagConstraintPhase phase, T min, T max) : |
174 | 174 | JVMFlagLimit(type_enum, func, phase, HAS_RANGE | HAS_CONSTRAINT), _min(min), _max(max) {}
|
175 | 175 |
|
176 | 176 | T min() const { return _min; }
|
|
0 commit comments