author | gziemski |
Mon, 23 Apr 2018 14:51:16 -0500 | |
changeset 49860 | ca5216a2a2cc |
child 56478 | 90df053536e0 |
child 56489 | 016b77c3734a |
permissions | -rw-r--r-- |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
1 |
/* |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
2 |
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
4 |
* |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
8 |
* |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
13 |
* accompanied this code). |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
14 |
* |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
18 |
* |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
21 |
* questions. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
22 |
* |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
23 |
*/ |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
24 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
25 |
#include "precompiled.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
26 |
#include "classfile/stringTable.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
27 |
#include "classfile/symbolTable.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
28 |
#include "gc/shared/commandLineFlagConstraintsGC.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
29 |
#include "runtime/arguments.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
30 |
#include "runtime/commandLineFlagConstraintList.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
31 |
#include "runtime/commandLineFlagConstraintsCompiler.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
32 |
#include "runtime/commandLineFlagConstraintsRuntime.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
33 |
#include "runtime/os.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
34 |
#include "utilities/macros.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
35 |
#ifdef COMPILER1 |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
36 |
#include "c1/c1_globals.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
37 |
#endif |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
38 |
#ifdef COMPILER2 |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
39 |
#include "opto/c2_globals.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
40 |
#endif |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
41 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
42 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
43 |
class CommandLineFlagConstraint_bool : public CommandLineFlagConstraint { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
44 |
CommandLineFlagConstraintFunc_bool _constraint; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
45 |
const bool* _ptr; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
46 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
47 |
public: |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
48 |
// the "name" argument must be a string literal |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
49 |
CommandLineFlagConstraint_bool(const char* name, const bool* ptr, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
50 |
CommandLineFlagConstraintFunc_bool func, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
51 |
ConstraintType type) : CommandLineFlagConstraint(name, type), _constraint(func), _ptr(ptr) {} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
52 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
53 |
Flag::Error apply(bool verbose) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
54 |
bool value = *_ptr; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
55 |
return _constraint(value, verbose); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
56 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
57 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
58 |
Flag::Error apply_bool(bool value, bool verbose) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
59 |
return _constraint(value, verbose); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
60 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
61 |
}; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
62 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
63 |
class CommandLineFlagConstraint_int : public CommandLineFlagConstraint { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
64 |
CommandLineFlagConstraintFunc_int _constraint; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
65 |
const int* _ptr; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
66 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
67 |
public: |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
68 |
// the "name" argument must be a string literal |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
69 |
CommandLineFlagConstraint_int(const char* name, const int* ptr, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
70 |
CommandLineFlagConstraintFunc_int func, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
71 |
ConstraintType type) : CommandLineFlagConstraint(name, type), _constraint(func), _ptr(ptr) {} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
72 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
73 |
Flag::Error apply(bool verbose) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
74 |
int value = *_ptr; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
75 |
return _constraint(value, verbose); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
76 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
77 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
78 |
Flag::Error apply_int(int value, bool verbose) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
79 |
return _constraint(value, verbose); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
80 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
81 |
}; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
82 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
83 |
class CommandLineFlagConstraint_intx : public CommandLineFlagConstraint { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
84 |
CommandLineFlagConstraintFunc_intx _constraint; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
85 |
const intx* _ptr; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
86 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
87 |
public: |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
88 |
// the "name" argument must be a string literal |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
89 |
CommandLineFlagConstraint_intx(const char* name, const intx* ptr, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
90 |
CommandLineFlagConstraintFunc_intx func, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
91 |
ConstraintType type) : CommandLineFlagConstraint(name, type), _constraint(func), _ptr(ptr) {} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
92 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
93 |
Flag::Error apply(bool verbose) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
94 |
intx value = *_ptr; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
95 |
return _constraint(value, verbose); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
96 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
97 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
98 |
Flag::Error apply_intx(intx value, bool verbose) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
99 |
return _constraint(value, verbose); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
100 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
101 |
}; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
102 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
103 |
class CommandLineFlagConstraint_uint : public CommandLineFlagConstraint { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
104 |
CommandLineFlagConstraintFunc_uint _constraint; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
105 |
const uint* _ptr; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
106 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
107 |
public: |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
108 |
// the "name" argument must be a string literal |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
109 |
CommandLineFlagConstraint_uint(const char* name, const uint* ptr, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
110 |
CommandLineFlagConstraintFunc_uint func, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
111 |
ConstraintType type) : CommandLineFlagConstraint(name, type), _constraint(func), _ptr(ptr) {} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
112 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
113 |
Flag::Error apply(bool verbose) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
114 |
uint value = *_ptr; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
115 |
return _constraint(value, verbose); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
116 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
117 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
118 |
Flag::Error apply_uint(uint value, bool verbose) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
119 |
return _constraint(value, verbose); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
120 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
121 |
}; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
122 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
123 |
class CommandLineFlagConstraint_uintx : public CommandLineFlagConstraint { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
124 |
CommandLineFlagConstraintFunc_uintx _constraint; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
125 |
const uintx* _ptr; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
126 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
127 |
public: |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
128 |
// the "name" argument must be a string literal |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
129 |
CommandLineFlagConstraint_uintx(const char* name, const uintx* ptr, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
130 |
CommandLineFlagConstraintFunc_uintx func, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
131 |
ConstraintType type) : CommandLineFlagConstraint(name, type), _constraint(func), _ptr(ptr) {} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
132 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
133 |
Flag::Error apply(bool verbose) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
134 |
uintx value = *_ptr; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
135 |
return _constraint(value, verbose); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
136 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
137 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
138 |
Flag::Error apply_uintx(uintx value, bool verbose) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
139 |
return _constraint(value, verbose); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
140 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
141 |
}; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
142 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
143 |
class CommandLineFlagConstraint_uint64_t : public CommandLineFlagConstraint { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
144 |
CommandLineFlagConstraintFunc_uint64_t _constraint; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
145 |
const uint64_t* _ptr; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
146 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
147 |
public: |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
148 |
// the "name" argument must be a string literal |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
149 |
CommandLineFlagConstraint_uint64_t(const char* name, const uint64_t* ptr, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
150 |
CommandLineFlagConstraintFunc_uint64_t func, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
151 |
ConstraintType type) : CommandLineFlagConstraint(name, type), _constraint(func), _ptr(ptr) {} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
152 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
153 |
Flag::Error apply(bool verbose) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
154 |
uint64_t value = *_ptr; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
155 |
return _constraint(value, verbose); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
156 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
157 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
158 |
Flag::Error apply_uint64_t(uint64_t value, bool verbose) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
159 |
return _constraint(value, verbose); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
160 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
161 |
}; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
162 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
163 |
class CommandLineFlagConstraint_size_t : public CommandLineFlagConstraint { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
164 |
CommandLineFlagConstraintFunc_size_t _constraint; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
165 |
const size_t* _ptr; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
166 |
public: |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
167 |
// the "name" argument must be a string literal |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
168 |
CommandLineFlagConstraint_size_t(const char* name, const size_t* ptr, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
169 |
CommandLineFlagConstraintFunc_size_t func, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
170 |
ConstraintType type) : CommandLineFlagConstraint(name, type), _constraint(func), _ptr(ptr) {} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
171 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
172 |
Flag::Error apply(bool verbose) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
173 |
size_t value = *_ptr; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
174 |
return _constraint(value, verbose); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
175 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
176 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
177 |
Flag::Error apply_size_t(size_t value, bool verbose) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
178 |
return _constraint(value, verbose); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
179 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
180 |
}; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
181 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
182 |
class CommandLineFlagConstraint_double : public CommandLineFlagConstraint { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
183 |
CommandLineFlagConstraintFunc_double _constraint; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
184 |
const double* _ptr; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
185 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
186 |
public: |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
187 |
// the "name" argument must be a string literal |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
188 |
CommandLineFlagConstraint_double(const char* name, const double* ptr, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
189 |
CommandLineFlagConstraintFunc_double func, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
190 |
ConstraintType type) : CommandLineFlagConstraint(name, type), _constraint(func), _ptr(ptr) {} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
191 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
192 |
Flag::Error apply(bool verbose) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
193 |
double value = *_ptr; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
194 |
return _constraint(value, verbose); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
195 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
196 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
197 |
Flag::Error apply_double(double value, bool verbose) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
198 |
return _constraint(value, verbose); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
199 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
200 |
}; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
201 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
202 |
// No constraint emitting |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
203 |
void emit_constraint_no(...) { /* NOP */ } |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
204 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
205 |
// No constraint emitting if function argument is NOT provided |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
206 |
void emit_constraint_bool(const char* /*name*/, const bool* /*value*/) { /* NOP */ } |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
207 |
void emit_constraint_ccstr(const char* /*name*/, const ccstr* /*value*/) { /* NOP */ } |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
208 |
void emit_constraint_ccstrlist(const char* /*name*/, const ccstrlist* /*value*/) { /* NOP */ } |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
209 |
void emit_constraint_int(const char* /*name*/, const int* /*value*/) { /* NOP */ } |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
210 |
void emit_constraint_intx(const char* /*name*/, const intx* /*value*/) { /* NOP */ } |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
211 |
void emit_constraint_uint(const char* /*name*/, const uint* /*value*/) { /* NOP */ } |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
212 |
void emit_constraint_uintx(const char* /*name*/, const uintx* /*value*/) { /* NOP */ } |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
213 |
void emit_constraint_uint64_t(const char* /*name*/, const uint64_t* /*value*/) { /* NOP */ } |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
214 |
void emit_constraint_size_t(const char* /*name*/, const size_t* /*value*/) { /* NOP */ } |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
215 |
void emit_constraint_double(const char* /*name*/, const double* /*value*/) { /* NOP */ } |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
216 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
217 |
// CommandLineFlagConstraint emitting code functions if function argument is provided |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
218 |
void emit_constraint_bool(const char* name, const bool* ptr, CommandLineFlagConstraintFunc_bool func, CommandLineFlagConstraint::ConstraintType type) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
219 |
CommandLineFlagConstraintList::add(new CommandLineFlagConstraint_bool(name, ptr, func, type)); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
220 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
221 |
void emit_constraint_int(const char* name, const int* ptr, CommandLineFlagConstraintFunc_int func, CommandLineFlagConstraint::ConstraintType type) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
222 |
CommandLineFlagConstraintList::add(new CommandLineFlagConstraint_int(name, ptr, func, type)); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
223 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
224 |
void emit_constraint_intx(const char* name, const intx* ptr, CommandLineFlagConstraintFunc_intx func, CommandLineFlagConstraint::ConstraintType type) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
225 |
CommandLineFlagConstraintList::add(new CommandLineFlagConstraint_intx(name, ptr, func, type)); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
226 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
227 |
void emit_constraint_uint(const char* name, const uint* ptr, CommandLineFlagConstraintFunc_uint func, CommandLineFlagConstraint::ConstraintType type) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
228 |
CommandLineFlagConstraintList::add(new CommandLineFlagConstraint_uint(name, ptr, func, type)); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
229 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
230 |
void emit_constraint_uintx(const char* name, const uintx* ptr, CommandLineFlagConstraintFunc_uintx func, CommandLineFlagConstraint::ConstraintType type) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
231 |
CommandLineFlagConstraintList::add(new CommandLineFlagConstraint_uintx(name, ptr, func, type)); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
232 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
233 |
void emit_constraint_uint64_t(const char* name, const uint64_t* ptr, CommandLineFlagConstraintFunc_uint64_t func, CommandLineFlagConstraint::ConstraintType type) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
234 |
CommandLineFlagConstraintList::add(new CommandLineFlagConstraint_uint64_t(name, ptr, func, type)); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
235 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
236 |
void emit_constraint_size_t(const char* name, const size_t* ptr, CommandLineFlagConstraintFunc_size_t func, CommandLineFlagConstraint::ConstraintType type) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
237 |
CommandLineFlagConstraintList::add(new CommandLineFlagConstraint_size_t(name, ptr, func, type)); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
238 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
239 |
void emit_constraint_double(const char* name, const double* ptr, CommandLineFlagConstraintFunc_double func, CommandLineFlagConstraint::ConstraintType type) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
240 |
CommandLineFlagConstraintList::add(new CommandLineFlagConstraint_double(name, ptr, func, type)); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
241 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
242 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
243 |
// Generate code to call emit_constraint_xxx function |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
244 |
#define EMIT_CONSTRAINT_PRODUCT_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
245 |
#define EMIT_CONSTRAINT_COMMERCIAL_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
246 |
#define EMIT_CONSTRAINT_DIAGNOSTIC_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
247 |
#define EMIT_CONSTRAINT_EXPERIMENTAL_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
248 |
#define EMIT_CONSTRAINT_MANAGEABLE_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
249 |
#define EMIT_CONSTRAINT_PRODUCT_RW_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
250 |
#define EMIT_CONSTRAINT_PD_PRODUCT_FLAG(type, name, doc) ); emit_constraint_##type(#name,&name |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
251 |
#define EMIT_CONSTRAINT_PD_DIAGNOSTIC_FLAG(type, name, doc) ); emit_constraint_##type(#name,&name |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
252 |
#ifndef PRODUCT |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
253 |
#define EMIT_CONSTRAINT_DEVELOPER_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
254 |
#define EMIT_CONSTRAINT_PD_DEVELOPER_FLAG(type, name, doc) ); emit_constraint_##type(#name,&name |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
255 |
#define EMIT_CONSTRAINT_NOTPRODUCT_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
256 |
#else |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
257 |
#define EMIT_CONSTRAINT_DEVELOPER_FLAG(type, name, value, doc) ); emit_constraint_no(#name,&name |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
258 |
#define EMIT_CONSTRAINT_PD_DEVELOPER_FLAG(type, name, doc) ); emit_constraint_no(#name,&name |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
259 |
#define EMIT_CONSTRAINT_NOTPRODUCT_FLAG(type, name, value, doc) ); emit_constraint_no(#name,&name |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
260 |
#endif |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
261 |
#ifdef _LP64 |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
262 |
#define EMIT_CONSTRAINT_LP64_PRODUCT_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
263 |
#else |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
264 |
#define EMIT_CONSTRAINT_LP64_PRODUCT_FLAG(type, name, value, doc) ); emit_constraint_no(#name,&name |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
265 |
#endif |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
266 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
267 |
// Generate func argument to pass into emit_constraint_xxx functions |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
268 |
#define EMIT_CONSTRAINT_CHECK(func, type) , func, CommandLineFlagConstraint::type |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
269 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
270 |
// the "name" argument must be a string literal |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
271 |
#define INITIAL_CONSTRAINTS_SIZE 72 |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
272 |
GrowableArray<CommandLineFlagConstraint*>* CommandLineFlagConstraintList::_constraints = NULL; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
273 |
CommandLineFlagConstraint::ConstraintType CommandLineFlagConstraintList::_validating_type = CommandLineFlagConstraint::AtParse; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
274 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
275 |
// Check the ranges of all flags that have them or print them out and exit if requested |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
276 |
void CommandLineFlagConstraintList::init(void) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
277 |
_constraints = new (ResourceObj::C_HEAP, mtArguments) GrowableArray<CommandLineFlagConstraint*>(INITIAL_CONSTRAINTS_SIZE, true); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
278 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
279 |
emit_constraint_no(NULL VM_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
280 |
EMIT_CONSTRAINT_PD_DEVELOPER_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
281 |
EMIT_CONSTRAINT_PRODUCT_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
282 |
EMIT_CONSTRAINT_PD_PRODUCT_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
283 |
EMIT_CONSTRAINT_DIAGNOSTIC_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
284 |
EMIT_CONSTRAINT_PD_DIAGNOSTIC_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
285 |
EMIT_CONSTRAINT_EXPERIMENTAL_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
286 |
EMIT_CONSTRAINT_NOTPRODUCT_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
287 |
EMIT_CONSTRAINT_MANAGEABLE_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
288 |
EMIT_CONSTRAINT_PRODUCT_RW_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
289 |
EMIT_CONSTRAINT_LP64_PRODUCT_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
290 |
IGNORE_RANGE, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
291 |
EMIT_CONSTRAINT_CHECK, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
292 |
IGNORE_WRITEABLE)); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
293 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
294 |
EMIT_CONSTRAINTS_FOR_GLOBALS_EXT |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
295 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
296 |
emit_constraint_no(NULL ARCH_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
297 |
EMIT_CONSTRAINT_PRODUCT_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
298 |
EMIT_CONSTRAINT_DIAGNOSTIC_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
299 |
EMIT_CONSTRAINT_EXPERIMENTAL_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
300 |
EMIT_CONSTRAINT_NOTPRODUCT_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
301 |
IGNORE_RANGE, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
302 |
EMIT_CONSTRAINT_CHECK, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
303 |
IGNORE_WRITEABLE)); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
304 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
305 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
306 |
#ifdef COMPILER1 |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
307 |
emit_constraint_no(NULL C1_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
308 |
EMIT_CONSTRAINT_PD_DEVELOPER_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
309 |
EMIT_CONSTRAINT_PRODUCT_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
310 |
EMIT_CONSTRAINT_PD_PRODUCT_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
311 |
EMIT_CONSTRAINT_DIAGNOSTIC_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
312 |
EMIT_CONSTRAINT_PD_DIAGNOSTIC_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
313 |
EMIT_CONSTRAINT_NOTPRODUCT_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
314 |
IGNORE_RANGE, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
315 |
EMIT_CONSTRAINT_CHECK, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
316 |
IGNORE_WRITEABLE)); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
317 |
#endif // COMPILER1 |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
318 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
319 |
#ifdef COMPILER2 |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
320 |
emit_constraint_no(NULL C2_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
321 |
EMIT_CONSTRAINT_PD_DEVELOPER_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
322 |
EMIT_CONSTRAINT_PRODUCT_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
323 |
EMIT_CONSTRAINT_PD_PRODUCT_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
324 |
EMIT_CONSTRAINT_DIAGNOSTIC_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
325 |
EMIT_CONSTRAINT_PD_DIAGNOSTIC_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
326 |
EMIT_CONSTRAINT_EXPERIMENTAL_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
327 |
EMIT_CONSTRAINT_NOTPRODUCT_FLAG, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
328 |
IGNORE_RANGE, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
329 |
EMIT_CONSTRAINT_CHECK, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
330 |
IGNORE_WRITEABLE)); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
331 |
#endif // COMPILER2 |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
332 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
333 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
334 |
CommandLineFlagConstraint* CommandLineFlagConstraintList::find(const char* name) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
335 |
CommandLineFlagConstraint* found = NULL; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
336 |
for (int i=0; i<length(); i++) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
337 |
CommandLineFlagConstraint* constraint = at(i); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
338 |
if (strcmp(constraint->name(), name) == 0) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
339 |
found = constraint; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
340 |
break; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
341 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
342 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
343 |
return found; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
344 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
345 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
346 |
// Find constraints by name and return only if found constraint's type is equal or lower than current validating type. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
347 |
CommandLineFlagConstraint* CommandLineFlagConstraintList::find_if_needs_check(const char* name) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
348 |
CommandLineFlagConstraint* found = NULL; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
349 |
CommandLineFlagConstraint* constraint = find(name); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
350 |
if (constraint && (constraint->type() <= _validating_type)) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
351 |
found = constraint; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
352 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
353 |
return found; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
354 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
355 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
356 |
// Check constraints for specific constraint type. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
357 |
bool CommandLineFlagConstraintList::check_constraints(CommandLineFlagConstraint::ConstraintType type) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
358 |
guarantee(type > _validating_type, "Constraint check is out of order."); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
359 |
_validating_type = type; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
360 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
361 |
bool status = true; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
362 |
for (int i=0; i<length(); i++) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
363 |
CommandLineFlagConstraint* constraint = at(i); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
364 |
if (type != constraint->type()) continue; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
365 |
if (constraint->apply(true) != Flag::SUCCESS) status = false; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
366 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
367 |
return status; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
368 |
} |